Klausos Klausos
Klausos Klausos

Reputation: 16050

How to install Matplotlib's basemap?

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.

Upvotes: 13

Views: 73245

Answers (5)

Azam
Azam

Reputation: 147

Currently there is fastest way to install basemap using mamba. Infact, you can install any library from mamba. first thing to do you must install mamba, with this command; conda install mamba -n base -c conda-forge, then you can proceed installing basemap using the command mamba install basemap. After completion the installation, please set your path environment as PROJ_LIB in user variable and set your packages proj-7.2.0 location.

Upvotes: 0

Hamza Ahmed
Hamza Ahmed

Reputation: 31

while importing like (from mpl_toolkits.basemap import Basemap) I was getting error.

For me This Worked Like charm:

pip install basemap

Upvotes: 0

user15410405
user15410405

Reputation: 81

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.

Upvotes: 1

Ghanshyam Savaliya
Ghanshyam Savaliya

Reputation: 608

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.

Upvotes: 3

Leb
Leb

Reputation: 15953

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.

Upvotes: 23

Related Questions