Run shell as Administrator:
python -m pip install <package-name>.whl
- If this package has some dependencies, you also need to download and install these dependencies mannualy, which are also shown in the WARNING info as
/simple/<dependency-package>/
. - Do not use the
--force-reinstall
option, since this will make pip to fetch dependencies remotely, which is not suitable for this case. - It is possible to write a script to extract the dependencies from the WARNING info, and fetch the .whl automatically from pypi.org and install it.
- Archived: Python Extension Packages for Windows - Christoph Gohlke
<package>
· PyPI- https://pypi.org/project/
<package>
/#files
- https://pypi.org/project/
Check your windows env variable for HTTP_PROXY
:
echo %HTTP_PROXY%
There might be some deprecated configurations, so you need to clear them first.
In Windows, add this to C:/Users/<username>/pip/pip.ini
:
[global]
proxy = http://<server>:<port>
In Windows, add this to C:/Users/<username>/pip/pip.ini
:
[global]
proxy = http://<server>:<port>
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
trusted-host = pypi.tuna.tsinghua.edu.cn
In Linux, use following command to view pip.conf
pip config -v list
If no contents exist in the files above, create a new file and add above lines:
cd ~ && mkdir .pip && touch pip.conf