我遵循了official instruction并尝试了pip install git+git://github.com/geopandas/geopandas.git
和pip install geopandas
,但是我得到的只是以下内容。不是计算机向导,我根本看不懂。有人可以帮助我弄清楚如何成功安装geopandas
吗?
PS D:\Python\Scripts> pip install git+git://github.com/geopandas/geopandas.git
Collecting git+git://github.com/geopandas/geopandas.git
Cloning git://github.com/geopandas/geopandas.git to c:\users\ariel\appdata\local\temp\pip-req-build-mzuz5obu
Requirement already satisfied: pandas>=0.24.0 in d:\python\lib\site-packages (from geopandas==0.8.0+52.g7e595d0) (1.0.3)
Collecting shapely>=1.6
Using cached Shapely-1.7.1-cp38-cp38-win_amd64.whl (1.0 MB)
Collecting fiona>=1.8
Using cached Fiona-1.8.17.tar.gz (1.3 MB)
ERROR: Command errored out with exit status 1:
command: 'd:\python\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ariel\\AppData\\Local\\Temp\\pip-install-x28x2nrd\\fiona\\setup.py'"'"'; __file__='"'"'C:\\Users\\ariel\\AppData\\Local\\Temp\\pip-install-x28x2nrd\\fiona\\
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\ariel\AppData\Local\Temp\pip-pip-egg-info-kqm2six3'
cwd: C:\Users\ariel\AppData\Local\Temp\pip-install-x28x2nrd\fiona\
Complete output (1 lines):
A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
PS D:\Python\Scripts>
我还首先尝试了pip install -U setuptools
,但输出并没有太大不同:
PS D:\Python\Scripts> pip install -U setuptools Collecting setuptools
Downloading setuptools-50.3.0-py3-none-any.whl (785 kB)
|████████████████████████████████| 785 kB 1.1 MB/s
Installing collected packages: setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 41.2.0
Uninstalling setuptools-41.2.0:
Successfully uninstalled setuptools-41.2.0
Successfully installed setuptools-50.3.0
PS D:\Python\Scripts> pip install git+git://github.com/geopandas/geopandas.git
Collecting git+git://github.com/geopandas/geopandas.git
Cloning git://github.com/geopandas/geopandas.git to c:\users\ariel\appdata\local\temp\pip-req-build-ujqm8v_3
Requirement already satisfied: pandas>=0.24.0 in d:\python\lib\site-packages (from geopandas==0.8.0+52.g7e595d0) (1.0.3)
Collecting shapely>=1.6
Using cached Shapely-1.7.1-cp38-cp38-win_amd64.whl (1.0 MB)
Collecting fiona>=1.8
Using cached Fiona-1.8.17.tar.gz (1.3 MB)
ERROR: Command errored out with exit status 1:
command: 'd:\python\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ariel\\AppData\\Local\\Temp\\pip-install-no2ywi23\\fiona\\setup.py'"'"'; __file__='"'"'C:\\Users\\ariel\\AppData\\Local\\Temp\\pip-install-no2ywi23\\fiona\\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\ariel\AppData\Local\Temp\pip-pip-egg-info-8o705rvl'
cwd: C:\Users\ariel\AppData\Local\Temp\pip-install-no2ywi23\fiona\
Complete output (1 lines):
A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
PS D:\Python\Scripts>
然后我安装了Miniconda
并尝试了说明中的内容:
PS D:\Python\Scripts> conda install geopandas
conda : The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ conda install geopandas
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (conda:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
答案 0 :(得分:1)
使用pip安装它可能很麻烦,因此请尝试以下链接。 Conda install some-package hangs with (Solving environment: failed)