2012/8/24 Carlos Grohmann <carlos.grohm...@gmail.com>:
> 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
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to