If pip does not work after changing the source, then you can try this method

Two errors I've encountered

First:

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:732: The handshake operation timed out',))': /simple/%20--trusted-host%20pypi.douban.com/pyqt5-tools/

 the second:

 The repository located at pypi.tuna.tsinghua.edu.cn is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with '--trusted-host pypi.tuna.tsinghua.edu.cn'.
  Could not find a version that satisfies the requirement pyqt5 (from versions: )
No matching distribution found for pyqt5

 

Just need the following command to solve it easily

pip install package -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

Note that you need to change the package to the package you need

At this time, the installation is successful

 I don’t know exactly why it is successful like this. Someone can explain it to me.

Guess you like

Origin blog.csdn.net/Wjeana/article/details/121276769