[Python-modules-team] Bug#776579: Bug#776579: ImportError: cannot	import name basemap
    Sandro Tosi 
    morph at debian.org
       
    Thu Jan 29 19:38:10 UTC 2015
    
    
  
control: tags -1 + moreinfo unreproducible
control: severity -1 minor
Hello,
On Thu, Jan 29, 2015 at 2:21 PM, giacomo boffi <boffi at stru.polimi.it> wrote:
> I installed all the python-mpltoolkits.basemap* packages, then I tried to
> import the basemap module from the IPython prompt, as described in different
> tutorials
>
>  |  In [1]: from mpl_toolkits import basemap
>  |  ---------------------------------------------------------------------------
>  |  ImportError                               Traceback (most recent call last)
>  |  <ipython-input-1-e11b082cc26f> in <module>()
>  |  ----> 1 from mpl_toolkits import basemap
>  |
>  |  ImportError: cannot import name basemap
>  |
>  |  In [2]:
I just tried in a clean chroot and I can import basemap just fine, so
I suspect you have something specific on your system, like a
mpl_toolkits directory in the path you are running ipython/python or a
local installation of matplotlib; what is the output of:
python -c "import mpl_toolkits as m ; print m.__file__"
>  | In [2]: import mpl_toolkits
>  |
>  | In [3]: help(mpl_toolkits)
>  |
>  | Help on package mpl_toolkits:
>  |
>  | NAME
>  |     mpl_toolkits
>  |
>  | FILE
>  |     (built-in)
>  |
>  | PACKAGE CONTENTS
>  |     axes_grid (package)
>  |     axes_grid1 (package)
>  |     axisartist (package)
>  |     exceltools
>  |     gtktools
>  |     mplot3d (package)
>  |
>  | In [4]:
>
> while the "basemap" directory is placed in in the "mpl_toolkits" directory,
> with all the relevant stuff inside.
help() is a static text, so it doesnt proof much here.
Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
    
    
More information about the Python-modules-team
mailing list