简体   繁体   中英

errors while using pip install on windows 10 and Ubuntu 18.04 lts

I'm not new with Python programming, today I tried to install Django using "pip install Django" on my computer. I'm using Python 3.9.1, pip 20.2.3, PyCharm (community) 2020.3.2. I've tried everything, using pip3, trying to install libraries from pycharm termianl and from the pycharm interpreter configuration, I even format my computer(full foramt and the quick foramt) and nothing helped my. I searched for similar problems here but all of them didn't work. I get this problem over and over again (I tried to set the timeout to 100, and my internet connection is good and fast enough): (in this tryout I've tried to install numpy library, I get the same problem with every library that I tried)

(venv) C:\Users\achik\PycharmProjects\first>pip install numpy WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError(" HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/numpy/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError(" HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/numpy/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError(" HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/numpy/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError(" HTTPSConnectionPool(host='pypi.or g', port=443): Read timed out. (read timeout=15)")': /simple/numpy/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnection Pool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/numpy/ ERROR: Could not find a version that satisfies the requirement numpy (from versions: none) ERROR: No matching distribution found for numpy

Please help me, I'm about to lose my mind

UPDATE: I formatted my computer and reinstall windows 10, installed python 3.7 and older version of PyCharm and it didn't work. I formatted again my pc and installed Ubuntu 18.04 lts and again I have the same problem. PLEASE help me!

I had the same problem. Sometimes it is because of internet connection and sometimes cmd working so slow. If your antifilter is open, close it before executing commands on cmd. And whenever you faced this problem close cmd and run it as admin again... you can install needed packages without using pip as well. For example download a suitable version of numpy and save it on C:\Python\Tools\script and run it using cmd.

In Pycharm sometime this type of issue happens due to their venv file, if possible then please remove venv file from pycharm directory any add python in the environment variable and try to install NumPy from CMD. I hope this will resolve your issue, I was also facing the same issue and tried this & fortunately being solved.

I had this same error while installing django using pip. I solved it by disabling the cache

pip --no-cache-dir install <package name>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM