好像沒辦法安裝basemap捏 (在jupyternotebook 打 !pip install basemap)?
在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 "
回答列表
-
2021/12/24 上午 08:49Felix 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