Problem installing basemap

Hello,

I am new to python, matplotlib and basemap, but I _am_ familiar with Linux.

I have dome some searching on this but am still not sure where I am
going wrong. It looks like basemap is being installed as an "egg" even
though I used this command when installing:

python setup.py install

When I try an example, it won't run ... "ImportError: No module named basemap"

Here are some additional details:

~$ uname -r
2.6.28-15-server

~$ cat /etc/issue
Ubuntu 9.04

~$ python --version
Python 2.6.2

I installed matplotlib, numpy and other requirements via the package management

~$ sudo apt-get install python-numpy-ext
~$ sudo apt-get install python-matplotlib
~$ sudo aptitude update && sudo aptitude install g++
~$ sudo apt-get install build-essential
~$ sudo apt-get install python-dev

~$ ls /usr/local/lib/libgeos*
/usr/local/lib/libgeos-3.2.0.so
/usr/local/lib/libgeos_c.so.1
/usr/local/lib/libgeos.a
/usr/local/lib/libgeos_c.so.1.6.0
/usr/local/lib/libgeos_c.a
/usr/local/lib/libgeos.la
/usr/local/lib/libgeos_c.la
/usr/local/lib/libgeos.so
/usr/local/lib/libgeos_c.so

When installing, here is the command I have been running and the
subsequent output

~/Downloads/basemap-1.0$ sudo python setup.py install
checking for GEOS lib in /home/myusername ....
checking for GEOS lib in /usr ....
checking for GEOS lib in /usr/local ....
GEOS lib (version 3.2.0) found in /usr/local
checking to see if required version of pydap installed ..
pydap installed, checking version ...
pydap version OK, will not be installed
checking to see if httplib2 installed ..
httplib2 installed
checking to see if pyshapelib installed ..
pyshapelib installed
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands
--compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands
--fcompiler options
running build_src
building extension "mpl_toolkits.basemap._proj" sources
building extension "mpl_toolkits.basemap._geod" sources
building extension "_geoslib" sources
running build_py
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
running scons
running install_lib
running install_egg_info
Writing /usr/local/lib/python2.6/dist-packages/basemap-1.0.egg-info

~$ ls /usr/local/lib/python2.6/dist-packages/basemap-1.0*
/usr/local/lib/python2.6/dist-packages/basemap-1.0.egg-info

~$ ls /usr/local/lib/python2.6/dist-packages/mpl_toolkits
basemap
__init__.py
__init__.pyc

Sorry if this is too much info!

Thanks for any pointers.

~ Jeremy

Nevermind, I think I solved it...

$ cd /usr/local/lib/python2.6/dist-packages
$ sudo cp -R * /usr/lib/python2.6/dist-packages/

Maybe worth a note somewhere? Or maybe it is there, I just completely missed
the right configuration/installation step.

~ Jeremy

···

On Wed, Sep 22, 2010 at 2:00 PM, Jeremy Lounds <lounds@...149...> wrote:

Hello,

I am new to python, matplotlib and basemap, but I _am_ familiar with Linux.

I have dome some searching on this but am still not sure where I am
going wrong. It looks like basemap is being installed as an "egg" even
though I used this command when installing:

python setup.py install

When I try an example, it won't run ... "ImportError: No module named basemap"

Here are some additional details:

~$ uname -r
2.6.28-15-server

~$ cat /etc/issue
Ubuntu 9.04

~$ python --version
Python 2.6.2

I installed matplotlib, numpy and other requirements via the package management

~$ sudo apt-get install python-numpy-ext
~$ sudo apt-get install python-matplotlib
~$ sudo aptitude update && sudo aptitude install g++
~$ sudo apt-get install build-essential
~$ sudo apt-get install python-dev

~$ ls /usr/local/lib/libgeos*
/usr/local/lib/libgeos-3.2.0.so
/usr/local/lib/libgeos_c.so.1
/usr/local/lib/libgeos.a
/usr/local/lib/libgeos_c.so.1.6.0
/usr/local/lib/libgeos_c.a
/usr/local/lib/libgeos.la
/usr/local/lib/libgeos_c.la
/usr/local/lib/libgeos.so
/usr/local/lib/libgeos_c.so

When installing, here is the command I have been running and the
subsequent output

~/Downloads/basemap-1.0$ sudo python setup.py install
checking for GEOS lib in /home/myusername ....
checking for GEOS lib in /usr ....
checking for GEOS lib in /usr/local ....
GEOS lib (version 3.2.0) found in /usr/local
checking to see if required version of pydap installed ..
pydap installed, checking version ...
pydap version OK, will not be installed
checking to see if httplib2 installed ..
httplib2 installed
checking to see if pyshapelib installed ..
pyshapelib installed
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands
--compiler options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands
--fcompiler options
running build_src
building extension "mpl_toolkits.basemap._proj" sources
building extension "mpl_toolkits.basemap._geod" sources
building extension "_geoslib" sources
running build_py
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
running scons
running install_lib
running install_egg_info
Writing /usr/local/lib/python2.6/dist-packages/basemap-1.0.egg-info

~$ ls /usr/local/lib/python2.6/dist-packages/basemap-1.0*
/usr/local/lib/python2.6/dist-packages/basemap-1.0.egg-info

~$ ls /usr/local/lib/python2.6/dist-packages/mpl_toolkits
basemap
__init__.py
__init__.pyc

Sorry if this is too much info!

Thanks for any pointers.

~ Jeremy

I am not 100% certain on this, but if I remember correctly, the issue was that the python search path doesn’t go into /usr/local/lib. That or that the OS wasn’t searching for library files in /usr/local/lib. I can’t remember… Whatever it was, I don’t think it was specific to matplotlib.

I really should write notes to myself when I encounter these situations…

Ben Root

···

On Wed, Sep 22, 2010 at 1:14 PM, Jeremy Lounds <lounds@…149…> wrote:

Nevermind, I think I solved it…

$ cd /usr/local/lib/python2.6/dist-packages

$ sudo cp -R * /usr/lib/python2.6/dist-packages/

Maybe worth a note somewhere? Or maybe it is there, I just completely missed

the right configuration/installation step.

~ Jeremy