python - 在 Windows 上安装 geopandas 的问题
问题描述
我是使用 python 3.7.0 的新手,并且一直在尝试安装 geopandas 但出现错误。我正在使用 Windows 10 计算机。我已经安装了带有 conda 3.7.0 版的 anaconda 3.7。我能够安装一些其他模块,如散景、pyspark,但对于 geopandas 和 geoplot 有错误。有人可以帮我吗?先感谢您!
我conda
在命令提示符下使用了以管理员身份运行的命令:
conda install -c conda-forge/label/gcc7 geopandas
我收到以下错误:
Downloading and Extracting Packages
typing-3.6.4 | 45 KB | ############################################################################ | 100%
altair-2.2.2 | 278 KB | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: failed
CondaVerificationError: The package for path.py located at C:\Users\xxxx\Anaconda3\pkgs\path.py-11.0.1-py_0
appears to be corrupted. The path 'site-packages/path.py'
specified in the package manifest cannot be found.
CondaVerificationError: The package for path.py located at C:\Users\xxxx\Anaconda3\pkgs\path.py-11.0.1-py_0
appears to be corrupted. The path 'site-packages/path.py-11.0.1-py2.7.egg-info/PKG-INFO'
specified in the package manifest cannot be found.
CondaVerificationError: The package for path.py located at C:\Users\xxxx\Anaconda3\pkgs\path.py-11.0.1-py_0
appears to be corrupted. The path 'site-packages/path.py-11.0.1-py2.7.egg-info/SOURCES.txt'
specified in the package manifest cannot be found.
SafetyError: The package for path.py located at C:\Users\xxxx\Anaconda3\pkgs\path.py-11.0.1-py_0
appears to be corrupted. The path 'site-packages/path.py-11.0.1-py2.7.egg-info/installed-files.txt'
has a sha256 mismatch.
reported sha256: dbd14fc15e9ea05fff49340a8638e465f05a46e64718c3a3c895f933bdc9bd50
actual sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
CondaVerificationError: The package for path.py located at C:\Users\xxx\Anaconda3\pkgs\path.py-11.0.1-py_0
appears to be corrupted. The path 'site-packages/path.py-11.0.1-py2.7.egg-info/requires.txt'
specified in the package manifest cannot be found.
CondaVerificationError: The package for path.py located at C:\Users\xxx\Anaconda3\pkgs\path.py-11.0.1-py_0
appears to be corrupted. The path 'site-packages/test_path.py'
specified in the package manifest cannot be found.
ClobberError: The package 'conda-forge/label/gcc7::click-plugins-1.0.4-py_0' cannot be installed due to a
path collision for 'lib/site-packages/click_plugins-1.0.4.dist-info/installer'.
This path already exists in the target prefix, and it won't be removed
by an uninstall action in this transaction. The path is one that conda
doesn't recognize. It may have been created by another package manager.
ClobberError: The package 'conda-forge/label/gcc7::click-plugins-1.0.4-py_0' cannot be installed due to a
path collision for 'lib/site-packages/click_plugins-1.0.4.dist-info/metadata'.
This path already exists in the target prefix, and it won't be removed
by an uninstall action in this transaction. The path is one that conda
doesn't recognize. It may have been created by another package manager.
ClobberError: The package 'conda-forge/label/gcc7::click-plugins-1.0.4-py_0' cannot be installed due to a
path collision for 'lib/site-packages/click_plugins-1.0.4.dist-info/record'.
This path already exists in the target prefix, and it won't be removed
by an uninstall action in this transaction. The path is one that conda
doesn't recognize. It may have been created by another package manager.
ClobberError: The package 'conda-forge/label/gcc7::click-plugins-1.0.4-py_0' cannot be installed due to a
path collision for 'lib/site-packages/click_plugins-1.0.4.dist-info/wheel'.
This path already exists in the target prefix, and it won't be removed
by an uninstall action in this transaction. The path is one that conda
doesn't recognize. It may have been created by another package manager.
ClobberError: The package 'conda-forge/label/gcc7::click-plugins-1.0.4-py_0' cannot be installed due to a
path collision for 'lib/site-packages/click_plugins-1.0.4.dist-info/top_level.txt'.
This path already exists in the target prefix, and it won't be removed
by an uninstall action in this transaction. The path is one that conda
doesn't recognize. It may have been created by another package manager.
ClobberError: The package 'conda-forge/label/gcc7::click-plugins-1.0.4-py_0' cannot be installed due to a
path collision for 'lib/site-packages/click_plugins-1.0.4.dist-info/zip-safe'.
This path already exists in the target prefix, and it won't be removed
by an uninstall action in this transaction. The path is one that conda
doesn't recognize. It may have been created by another package manager.
ClobberError: The package 'conda-forge/label/gcc7::click-plugins-1.0.4-py_0' cannot be installed due to a
path collision for 'lib/site-packages/click_plugins/__init__.py'.
This path already exists in the target prefix, and it won't be removed
by an uninstall action in this transaction. The path is one that conda
doesn't recognize. It may have been created by another package manager.
ClobberError: The package 'conda-forge/label/gcc7::click-plugins-1.0.4-py_0' cannot be installed due to a
path collision for 'lib/site-packages/click_plugins/core.py'.
This path already exists in the target prefix, and it won't be removed
by an uninstall action in this transaction. The path is one that conda
doesn't recognize. It may have been created by another package manager.
ClobberError: The package 'conda-forge/label/gcc7::cligj-0.4.0-py_1' cannot be installed due to a
path collision for 'lib/site-packages/cligj/__init__.py'.
This path already exists in the target prefix, and it won't be removed
by an uninstall action in this transaction. The path is one that conda
doesn't recognize. It may have been created by another package manager.
ClobberError: The package 'conda-forge/label/gcc7::cligj-0.4.0-py_1' cannot be installed due to a
path collision for 'lib/site-packages/cligj/features.py'.
This path already exists in the target prefix, and it won't be removed
by an uninstall action in this transaction. The path is one that conda
doesn't recognize. It may have been created by another package manager.
ClobberError: The package 'conda-forge/label/gcc7::munch-2.3.2-py_0' cannot be installed due to a
path collision for 'lib/site-packages/munch/__init__.py'.
This path already exists in the target prefix, and it won't be removed
by an uninstall action in this transaction. The path is one that conda
doesn't recognize. It may have been created by another package manager.
ClobberError: The package 'conda-forge/label/gcc7::munch-2.3.2-py_0' cannot be installed due to a
path collision for 'lib/site-packages/munch/python3_compat.py'.
This path already exists in the target prefix, and it won't be removed
by an uninstall action in this transaction. The path is one that conda
doesn't recognize. It may have been created by another package manager.
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults::hdf4-4.2.13-h712560f_2, defaults::hdf5-1.8.18-hcf527f2_1
path: 'library/copying'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: defaults::hdf4-4.2.13-h712560f_2, defaults::hdf5-1.8.18-hcf527f2_1
path: 'library/release.txt'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: conda-forge/label/gcc7::jupyter_core-4.4.0-py_0, conda-forge/label/gcc7::jupyter-1.0.0-py_1
path: 'lib/site-packages/jupyter.py'
ClobberError: This transaction has incompatible packages due to a shared path.
packages: conda-forge/label/gcc7::jupyter_core-4.4.0-py_0, conda-forge/label/gcc7::jupyter-1.0.0-py_1
path: 'lib/site-packages/__pycache__/jupyter.cpython-36.pyc'
解决方案
对于 Windows:
重要的!您需要安装先决条件库的确切版本,它可能不是 2019 年 8 月 23 日的最新版本
-
- Shapely-1.6.4.post2-cp37-cp37m-win_amd64.whl
- pyproj-2.1.3-cp37-cp37m-win_amd64.whl
- 底图-1.2.1-cp37-cp37m-win_amd64.whl
- Fiona-1.8.6-cp37-cp37m-win_amd64.whl
- GDAL-2.4.1-cp37-cp37m-win_amd64.whl
- Cartopy-0.17.0-cp37-cp37m-win_amd64.whl
使用 pip 安装 whl 文件:“pip install download.location.directory\file.whl”
我使用的是 python 3.7,所以我选择 cp37 文件,如果您使用的是 python 2.7,则需要获取 cp27 文件。
我使用的是Win-64bit所以我选择amd64文件,如果你使用的是Win32那么你需要选择win32文件
从同一位置下载并安装:
- geopandas-0.5.1-py2.py3-none-any.whl
我也安装(如果需要,可选)
笛卡尔-1.1.0-py2.py3-none-any.whl
pyepsg-0.4.0-py3-none-any.whl
推荐阅读
- c - 输出如何作为 1 而不是 j 的地址
- javascript - 如何在 js/.net 中通过各种值(组合过滤器)过滤 xml 记录
- android - 在 Json 改造屏幕上显示 ListView 的问题
- c++ - std::queue 对于单个生产者和单个消费者是线程安全的吗?
- python-3.x - 如何在另一个 python 函数中执行 python 文件?
- mpxj - 从 Microsoft Project 读取任务时大纲编号无效 - Microsoft Project 六月更新后?
- sql - 根据日期中的月份将单行拆分为多行
- javascript - 模板解析错误角度 8
- swift - 尝试从 PHAssetCollection.fetchAssetCollections 获取所有照片时出错
- php - 尝试在 Windows 7 机器上安装 Composer 时出现 PHP 设置错误