Results 1 to 5 of 5

Thread: matplotlib Basemap installation

  1. #1
    Join Date
    Feb 2013
    Beans
    6

    matplotlib Basemap installation

    Hi
    I am running Ubuntu 10.04 and have already installed python and matplotlib. I wanted to plot data on maps and tried to install the basemap package from matplotlib for this purpose. I followed the instructions that are given here:
    http://matplotlib.org/basemap/users/installing.html

    When I completed the installation and, as suggested in the guide, I typed 'from mpl_toolkits.basemap import Basemap' at the python prompt I get the following error:
    Code:
     File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python2.6/dist-packages/mpl_toolkits/basemap/__init__.py", line 30, in <module>
        from mpl_toolkits.basemap import pyproj
    ImportError: cannot import name pyproj
    What is surprising is that, I repeat the same command, and I sometimes get an error that is different but of a similar form: an import error that says 'cannot import X'

    Any help to resolve this would be highly appreciated.
    Thanks.

  2. #2
    Join Date
    Nov 2010
    Location
    India
    Beans
    4,839
    Distro
    Ubuntu Development Release

    Re: matplotlib Basemap installation

    are you sure about installation of the required libraries ?
    Google First your issue , if no solution then ask.

    రాజ శేఖర్ రెడ్డి

  3. #3
    Join Date
    Feb 2013
    Beans
    6

    Re: matplotlib Basemap installation

    Quote Originally Posted by raja.genupula View Post
    are you sure about installation of the required libraries ?
    Thanks for the response. I installed python-dev and GEOS, the latter according to the instructions on the matplotlib website. I think the error has something to do with a different directory being named pyproj but I am not sure how to fix it.

  4. #4
    Join Date
    Nov 2010
    Location
    India
    Beans
    4,839
    Distro
    Ubuntu Development Release

    Re: matplotlib Basemap installation

    open your terminal and do as
    Code:
    sudo apt-get install python-pyproj
    then try again.
    hope that helps.
    Google First your issue , if no solution then ask.

    రాజ శేఖర్ రెడ్డి

  5. #5
    Join Date
    Feb 2013
    Beans
    6

    Re: matplotlib Basemap installation

    Quote Originally Posted by raja.genupula View Post
    open your terminal and do as
    Code:
    sudo apt-get install python-pyproj
    then try again.
    hope that helps.
    Thanks. I actually got into a much bigger mess trying to figure this out. I just started a new thread on that.



    http://ubuntuforums.org/showthread.php?t=2111728

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •