Basemap with Python 3.5 Anaconda on Windows(在 Windows 上使用 Python 3.5 Anaconda 的底图)

本文介绍了在 Windows 上使用 Python 3.5 Anaconda 的底图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows(64 位)上使用 Python 3.5 和最新版本的 Anaconda.我想使用 conda install basemap 安装 Basemap.显然 Python 3 和底图之间存在冲突.经过一番谷歌搜索后,我确实发现 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 和底图的第二个环境吗?我从来没有这样做过,但似乎有可能(http://conda.pydata.org/docs/py2or3.html).它安全"吗?我应该在第二个环境中再次安装所有其他软件包(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.

推荐答案

这个问题我已经解决了好几次了(最近一次),从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 的底图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!