How to install Matplotlib's basemap?

57,566

Solution 1

Use this download for basemap on Windows.

It worked for me:

pip install basemap-1.0.8-cp34-none-win_amd64.whl

Assuming you're in right directory of course.

Solution 2

I had the same issue as I pip installed and then conda installed and then had to do a clean install as dependencies were a mess.

At that time I solved my problem by using Google Colab and installing the following:

!apt-get install -q libgeos-3.5.0
!apt-get install -q libgeos-dev
!pip install -q https://github.com/matplotlib/basemap/archive/master.zip
!pip install -q pyproj==1.9.6

I would also recommend reading Importing-of-Basemap-in-Google-Colab as it helped with Colab installation.

Solution 3

This is the alternate solution that might useful for anaconda users

For only Anaconda Users, they can get it to install on the local machine through the following command:

conda install basemap

This will auto-install all required dependency packages.

Here also, Assuming that User are at the right directory to install any module.

Share:
57,566
Klausos Klausos
Author by

Klausos Klausos

Updated on July 09, 2022

Comments

  • Klausos Klausos
    Klausos Klausos almost 2 years

    It is unclear to me how to install Matplotlib's Basemap on Windows. Maybe the question is straightforward, I need some help.

    I followed this tutorial. As far as I understand, first, GEOS and PROJ4 should be installed, and lastly matplotlib-1.4.3.win-amd64-py2.7.exe should be executed.

    I get stuck with GEOS. I downloaded source code of geos-3.5.0, "untarred" it, then I go to a Command Prompt, change directory to geos-3.5.0 and run this:

    export d://test
    

    but it does not work.

  • Leb
    Leb over 8 years
    You're welcome. It also got Shapely if you need it. Very useful.
  • Qwethm
    Qwethm over 3 years
    I know this is an old answer, but could you please elaborate on what you mean by "Assuming you're in right directory"? When I try to run the command, I get the error: ERROR: basemap‑1.2.2‑cp38‑cp38‑win_amd64.whl is not a valid wheel filename.
  • bjornasm
    bjornasm over 3 years
    @Qwethm You need to run your command in the same folder as the basemap-1.0.8-cp34-none-win_amd64.whl file (i.e in your downloads folder).