首先将需要安装的安装包复制到C:\Users\Administrator
打开cmd运行pip install geopy-2.0.0-py3-none-any.whl
若出现报错
WARNING: You are using pip version 20.2.4; however, version 20.3.1 is available.
You should consider upgrading via the 'd:\program files\python39\python.exe -m pip install --upgrade pip' command.
在cmd中输入
不要直接win+R然后cmd,而是要选择“开始”—“Windows系统”—“命令提示符”—右键“以管理员身份运行”!!!
输入:python -m pip install --upgrade pip -i https://pypi.douban.com/simple
安装中
Microsoft Windows [版本 10.0.18363.1198]
(c) 2019 Microsoft Corporation。保留所有权利。
C:\WINDOWS\system32>python -m pip install --upgrade pip -i https://pypi.douban.com/simple
Looking in indexes: https://pypi.douban.com/simple
Collecting pip
Downloading https://pypi.doubanio.com/packages/ab/11/2dc62c5263d9eb322f2f028f7b56cd9d096bb8988fcf82d65fa2e4057afe/pip-20.3.1-py2.py3-none-any.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 2.2 MB/s
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.2.4
Uninstalling pip-20.2.4:
Successfully uninstalled pip-20.2.4
Successfully installed pip-20.3.1
完成后用代码
pip install geopy-2.0.0-py3-none-any.whl
pip install Shapely-1.7.1-cp39-cp39-win_amd64.whl
pip install opencv_python-4.4.0-cp39-cp39-win_amd64.whl
分别安装Geopy、shapely、OpenCV的库,成功后代码如下
C:\Users\Administrator>pip install geopy-2.0.0-py3-none-any.whl
Processing c:\users\administrator\geopy-2.0.0-py3-none-any.whl
Requirement already satisfied: geographiclib<2,>=1.49 in d:\program files\python39\lib\site-packages (from geopy==2.0.0) (1.50)
geopy is already installed with the same version as the provided wheel. Use --force-reinstall to force an installation of the wheel.
C:\Users\Administrator>pip install Shapely-1.7.1-cp39-cp39-win_amd64.whl
Processing c:\users\administrator\shapely-1.7.1-cp39-cp39-win_amd64.whl
Installing collected packages: Shapely
Successfully installed Shapely-1.7.1
C:\Users\Administrator>pip install opencv_python-4.4.0-cp39-cp39-win_amd64.whl
Processing c:\users\administrator\opencv_python-4.4.0-cp39-cp39-win_amd64.whl
Installing collected packages: opencv-python
Successfully installed opencv-python-4.4.0
升级GDAL
pip install -U GDAL