Python 3.x 如何在Ubuntu 16.04上的Python 3/Matplotlib 2中安装Basemap?
我试过了 但似乎不是在PyPI上 有,但没有答案 我所做的Python 3.x 如何在Ubuntu 16.04上的Python 3/Matplotlib 2中安装Basemap?,python-3.x,matplotlib,ubuntu-16.04,matplotlib-basemap,Python 3.x,Matplotlib,Ubuntu 16.04,Matplotlib Basemap,我试过了 但似乎不是在PyPI上 有,但没有答案 我所做的 我下载了basemap 1.07() Matplotlib 2,numpy 1.11,PIL,python3 dev已安装 我不确定在哪里/如何获取GEOS(libgeos-dev?)。我想我遵循了自述文件,它没有显示任何错误,但是在尝试第一行的时候 我明白了 它在 ImportError: libgeos-3.3.3.so: cannot open shared object file: No such file or directo
python3 dev
已安装libgeos-dev
?)。我想我遵循了自述文件,它没有显示任何错误,但是在尝试第一行的时候
我明白了
它在
ImportError: libgeos-3.3.3.so: cannot open shared object file: No such file or directory
在Ubuntu中,这对我很有用:
$ locate libgeos-3.3.3.so
/home/math/Downloads/basemap-1.0.7/geos-3.3.3/src/.libs/libgeos-3.3.3.so
/usr/local/lib/libgeos-3.3.3.so
为了完整起见,如果您知道您需要特定版本,您可以通过将鼠标悬停在所需的软件包/版本号上来找到下载链接。例如,如果我需要安装v1.1.0,我可以使用上面的代码,将第二行替换为:
$ sudo apt-get install libgeos-dev
$ pip install --user https://github.com/matplotlib/basemap/archive/master.zip
试试这个:
$ pip install --user https://github.com/matplotlib/basemap/archive/v1.1.0.zip
旧版本可能与matplotlib不兼容。说明如何安装它不是很有帮助吗?这与上一个答案有什么区别?很好,它对我很有用!请注意:如果您在虚拟环境中,--user选项将不起作用work@kitsiosk你在python3上安装了它吗?@Raj是的,你遇到任何问题了吗?对我来说,上一个命令导致在“为basemap构建轮子(setup.py)”步骤中出错:
src/\u geoslib.c:4:10
抱怨Python.h
不存在。在Ubuntu 20.04上使用Python 3.6解决了这个问题
$ sudo apt-get install libgeos-dev
$ pip install --user https://github.com/matplotlib/basemap/archive/master.zip
$ pip install --user https://github.com/matplotlib/basemap/archive/v1.1.0.zip
sudo apt-get install libgeos-dev
sudo pip3 install -U git+https://github.com/matplotlib/basemap.git # latest Version from Source