我安装 Geopandas 出了什么问题?
What went wrong with my installing Geopandas?
我已经按照 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
用pip安装可能比较麻烦,试试下面的link。
Conda install some-package hangs with (Solving environment: failed)
我已经按照 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
用pip安装可能比较麻烦,试试下面的link。 Conda install some-package hangs with (Solving environment: failed)