I know that this problem has been asked before, and hope that the administrators will not regard this question as a duplicate for it is a bit different. I am using Python 3.6, Windows 10 system with 64 bit
. I've successfully installed pip and have used pip to install a bunch of packages (including numpy, matplotlib, mpl_toolkits and so on). But when I install the basemap and run the from mpl_toolkits.basemap install Basemap
, an error occurs saying that there is no module named "mpl_toolkits.basemap
. I go to the document of basemap and it says that GEOS
of 3.1.1 is required. And when I run the pip install geos
, what I get is only geos-0.2.1
.
https://i.stack.imgur.com/cuv9Q.jpg
(so inconvenient to upload pictures)
Is their any alternatives to download GEOS for the basemap installation? I know there's a way for Linux to install, but it does not seem to work on Windows.
I encountered similar problem and finally managed installing basemap
via Anaconda in my windows7 environment. I have tried following basemap
official installation instruction in Unix Shell and pip install xxx.whl
methods, and both failed. I think the possible reasons can be some file not compatible with Windows or not up to date.
Basemap installation via Anaconda:
1. Install Anaconda following official instruction.
2. Install basemap
using Anaconda Prompt (be sure to use Anaconda Prompt), run conda install -c anaconda-forge basemap
. This may prompt anaconda upgrade, accept it. Then anaconda will install the package and the prerequisites, including latest geos
, for you automatically.
3. Run with your favorite IDE. I run jupyter notebook from ANACONDA PROMPT, this is important. Since I have two versions of python, and basemap can not be loaded if I initiate jupyter notebook from cmd.
Have to mention that I did install PROJ4 in advance, so I am not sure if Anaconda will install it for you or not if you don't have one. Basemap official installation instruction: https://matplotlib.org/basemap/users/installing.html , you can also find PROJ4 instruction linkage there.
Hope this could help.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.