問題描述
我在 Windows(64 位)上使用 Python 3.5 和最新版本的 Anaconda.我想使用 conda install basemap
安裝 Basemap.顯然 Python 3 和底圖之間存在沖突.經(jīng)過一番谷歌搜索后,我確實發(fā)現(xiàn) Python 3 不支持 Windows 用戶的底圖(例如:https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/TjAwi3ilQaU).
I use Python 3.5 with latest version of Anaconda on Windows (64 bit). I wanted to install Basemap using conda install basemap
. Apparently there is a conflict between Python 3 and basemap. After some googling indeed I found that basemap is not supported on Python 3 for Windows users (ex: https://groups.google.com/a/continuum.io/forum/#!topic/anaconda/TjAwi3ilQaU).
出于顯而易見的原因,我不想降級到 Python 2.那么最簡單的替代解決方案是什么?
For obvious reasons I do not want to downgrade to Python 2. What would then be the simplest alternative solution?
- 是否有類似于底圖的替代包用于繪制地圖等?
- 我應該使用使用 Python 2 和底圖的第二個環(huán)境嗎?我從來沒有這樣做過,但似乎有可能(http://conda.pydata.org/docs/py2or3.html).它安全"嗎?我應該在第二個環(huán)境中再次安裝所有其他軟件包(matplotlib、numpy 等)嗎?
- Is there an alternative package similar to basemap for ploting maps, etc.?
- Should I use a second environment which uses Python 2 and basemap? I have never done that but it seems possible (http://conda.pydata.org/docs/py2or3.html). Is it "safe"? Should I install again all the other packages (matplotlib, numpy, etc.) on the second environment?
提前感謝您的幫助和建議.
Thanks in advance for the help and advice.
推薦答案
這個問題我已經(jīng)解決了好幾次了(最近一次),從http://www.lfd.uci.edu/~gohlke/pythonlibs并按照說明進行安裝.從 anaconda 命令提示符
I have solved this several times (last time just now) by downloading it from http://www.lfd.uci.edu/~gohlke/pythonlibs and follow the instructions to install. From the anaconda command prompt
pip install full_path_to_package
pip install full_path_to_package
例如,如果您下載了 basemap-1.1.0-cp36-cp36m-win_amd64.whl,您將運行
For example, if you downloaded basemap-1.1.0-cp36-cp36m-win_amd64.whl, you would run
pip install C:path ofileasemap-1.1.0-cp36-cp36m-win_amd64.whl
pip install C:path ofileasemap-1.1.0-cp36-cp36m-win_amd64.whl
請注意,.whl 文件的 python 版本必須匹配你的 python 版本.例如,...-cp36-....
表示 Python 3.6.您可以通過運行命令 python --version
找到您的 python 版本.
Note that the python version of the .whl file must match your python version. For example, ...-cp36-....
indicates Python 3.6. You can find your python version by running the command python --version
.
這篇關于在 Windows 上使用 Python 3.5 Anaconda 的底圖的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!