basemap via macports

Hello all,

I just did a fresh macports install, and installed py27-matplotlib-basemap, so all dependencies were installed as well.

After installing python, I did run port-select (or something like it) to make sure I’m using macports python.

My problem is that I can’t run it:

GuanoMac:~ guano$ python

Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)

[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin

Type “help”, “copyright”, “credits” or “license” for more information.

from mpl_toolkits.basemap import Basemap

Traceback (most recent call last):

File “”, line 1, in

ImportError: No module named basemap

Anyone experienced in this kind of installation could share hints?

tks

Carlos

···


Prof. Carlos Henrique Grohmann
Institute of Geosciences - Univ. of São Paulo, Brazil

  • Digital Terrain Analysis | GIS | Remote Sensing -

http://carlosgrohmann.com


Can’t stop the signal.

2012/8/24 Carlos Grohmann <carlos.grohmann@...287...>:

Hello all,

I just did a fresh macports install, and installed py27-matplotlib-basemap,
so all dependencies were installed as well.

After installing python, I did run port-select (or something like it) to
make sure I'm using macports python.

My problem is that I can't run it:

GuanoMac:~ guano$ python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

from mpl_toolkits.basemap import Basemap

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named basemap

Anyone experienced in this kind of installation could share hints?

if you do
import sys
print sys.path

you can check if the directory of basemap is in your path

if not, you can add it both in the scritp/session
appending/inserting/extending sys.path (which is a list):
e.g.: sys.path.append( "dir/to/basemap" )
or in the .profile, .bash_profile or .bash_rc files (in this way is
loaded in every session)
export PYTHONPATH=$PYTHONPATH:dir/to/basemap

cheers,
Francesco

···

tks

Carlos

--
Prof. Carlos Henrique Grohmann
Institute of Geosciences - Univ. of São Paulo, Brazil
- Digital Terrain Analysis | GIS | Remote Sensing -

http://carlosgrohmann.com
________________
Can’t stop the signal.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Hi,
Macports python is currently 2.7.3.
I don't think you are running macports python.

Try /opt/local/python & see if you have the same problem.

George Nurser

···

On 24 August 2012 15:46, Carlos Grohmann <carlos.grohmann@...287...> wrote:

Hello all,

I just did a fresh macports install, and installed py27-matplotlib-basemap,
so all dependencies were installed as well.

After installing python, I did run port-select (or something like it) to
make sure I'm using macports python.

My problem is that I can't run it:

GuanoMac:~ guano$ python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

from mpl_toolkits.basemap import Basemap

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named basemap

Anyone experienced in this kind of installation could share hints?

tks

Carlos

--
Prof. Carlos Henrique Grohmann
Institute of Geosciences - Univ. of São Paulo, Brazil
- Digital Terrain Analysis | GIS | Remote Sensing -

http://carlosgrohmann.com
________________
Can’t stop the signal.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

You are not running macports python (you’re running Apple python).
Try running /opt/local/bin/python27, and then import basemap.
-Jeff

···

On 8/24/12 8:46 AM, Carlos Grohmann
wrote:

Hello all,

    I just did a fresh macports install, and installed

py27-matplotlib-basemap, so all dependencies were installed as
well.

    After installing python, I did run port-select (or something

like it) to make sure I’m using macports python.

My problem is that I can’t run it:

GuanoMac:~ guano$ python

Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)

[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin

      Type "help", "copyright", "credits" or "license" for more

information.

from mpl_toolkits.basemap import Basemap

Traceback (most recent call last):

File “”, line 1, in

ImportError: No module named basemap

      Anyone experienced in this kind of installation could share

hints?

tks

Carlos

    Prof. Carlos Henrique Grohmann

    Institute of Geosciences - Univ. of São Paulo, Brazil
  • Digital Terrain Analysis | GIS | Remote Sensing -
      [http://carlosgrohmann.com](http://carlosgrohmann.com/)

        Can’t stop the signal.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats.
_______________________________________________
Matplotlib-users mailing list
-- Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : 325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web :

http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/Matplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-usersJeffrey.S.Whitaker@…259…http://tinyurl.com/5telg