logo
Loading...

好像沒辦法安裝basemap捏 (在jupyternotebook 打 !pip install basemap)? - Cupoy

在jupyternotebook 打 !pip install basemap 之後 就跑出下列這堆...

好像沒辦法安裝basemap捏 (在jupyternotebook 打 !pip install basemap)?

2021/12/23 下午 01:10
Basemap 進行地理資訊繪圖 (4/27更新)
A. Hung
觀看數:14
回答數:1
收藏數:1

在jupyternotebook 打 !pip install basemap 之後 就跑出下列這堆 Collecting basemap Using cached basemap-1.3.0b1.tar.gz (74 kB) ERROR: Command errored out with exit status 1: command: 'C:\Users\user\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-q0b26d85\\basemap_d4fff6b291c44e9e8a82574f5d90536d\\setup.py'"'"'; __file__='"'"'C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-q0b26d85\\basemap_d4fff6b291c44e9e8a82574f5d90536d\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\user\AppData\Local\Temp\pip-pip-egg-info-jin_vduy' cwd: C:\Users\user\AppData\Local\Temp\pip-install-q0b26d85\basemap_d4fff6b291c44e9e8a82574f5d90536d\ Complete output (7 lines): C:\Users\user\AppData\Local\Temp\pip-install-q0b26d85\basemap_d4fff6b291c44e9e8a82574f5d90536d\setup.py:82: RuntimeWarning: Cannot find GEOS library in standard locations ('C:\Users\user/local', 'C:\Users\user', '/usr/local', '/usr', '/opt/local', '/opt', '/sw'). Please install the corresponding packages using your software management system or set the environment variable GEOS_DIR to point to the location where GEOS is installed (for example, if 'geos_c.h' is in '/usr/local/include' and 'libgeos_c' is in '/usr/local/lib', then you need to set GEOS_DIR to '/usr/local' warnings.warn(" ".join([ Traceback (most recent call last): File "", line 1, in File "C:\Users\user\AppData\Local\Temp\pip-install-q0b26d85\basemap_d4fff6b291c44e9e8a82574f5d90536d\setup.py", line 126, in runtime_library_dirs, NameError: name 'runtime_library_dirs' is not defined ---------------------------------------- WARNING: Discarding https://files.pythonhosted.org/packages/64/31/a51f563ace0bab37c4046bc692ce29c14728a9f7a7fabcd9d5e9b43f6724/basemap-1.3.0b1.tar.gz#sha256=31d22b6721cac5f0d4e7cdcf9f75d31c0a3844abd44a0d51406fcb2d3188ebc3 (from https://pypi.org/simple/basemap/) (requires-python:>=2.6, !=3.0.*, !=3.1.*, <4). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Could not find a version that satisfies the requirement basemap ERROR: No matching distribution found for basemap

回答列表

  • 2021/12/24 上午 08:49
    Felix Pei
    贊同數:0
    不贊同數:0
    留言數:1

    同學你好,basemap套件的dependency比較多,安裝上也比較繁瑣,你可以參考下列的安裝說明 - 官方安裝教學 https://matplotlib.org/basemap/users/installing.html - 官方安裝教學(中文化) https://iamsbc.blogspot.com/2018/04/python-mac-osmatplotlib-basemap.html 另外附上知乎的安裝心得文 https://zhuanlan.zhihu.com/p/35845588 --- 如果是Windows的用戶,可參考下列教學 (由於手邊沒有Win環境, 下列並未實測) https://www.796t.com/article.php?id=78908 https://www.youtube.com/watch?v=61jPDxjKVQM