Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Install Matplotlib Basemap Module on Windows 7 with WinPython (or any Python stack install)?

I've found that the Basemap (module for matplotlib and Python) binary installer for Windows cannot detect Python on the system when Python is installed as part of a stack install, like Anaconda or WinPython. The installer exits, rather than allow you to point to the directory of installation.

I have to therefore install via source. However, I don't know the method to do this. The Readme.txt and install instructions don't seem to help. They simply instruct to "install geos-3.3.3 first" - well, how exactly? I don't see a setup.py in that directory.

Any help would be great. (Python 2.7, Win 7, 64b)

like image 206
r4gt4g Avatar asked Aug 07 '13 17:08

r4gt4g


1 Answers

I use windows. And my installation failed with official guidance, too. Finally I installed Basemap using the following method. Although I am not sure if it will go right for you, I just offer mine.

  1. First of all, you must have pip in your computer. (It is much easier to install, compared with Basemap and other things. And it can be used to install many useful packages.)

  2. Then go this great link: http://www.lfd.uci.edu/~gohlke/pythonlibs/

    And download the file named "basemap‑1.1.0‑cp27‑cp27m‑win32.whl".

  3. Move the .whl file to directory "C:\Python27". (Maybe you installed your python in different disk, then change it accordingly.)

  4. Open terminal. (Use cmd or Git Bash or something else.)

  5. Use command:

    pip install basemap‑1.1.0‑cp27‑cp27m‑win32.whl

like image 53
Temy Avatar answered Sep 27 '22 18:09

Temy