I want to install a package on pip, but I occur this error:
C:\Users\Mina>pip install sklearn
Collecting sklearn
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/sklearn/
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/sklearn/
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/sklearn/
Retrying (Retry(total=1, 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/sklearn/
Retrying (Retry(total=0, 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/sklearn/
Could not find a version that satisfies the requirement sklearn (from
versions: )
No matching distribution found for sklearn
This error appears to install any packages.
Note: i don't want to install on conda.
I would be very grateful if you guide me.
Best Regards,
Mina
If you check sklearn in pypi it tells you to use scikit-learn instead.
Try with: pip install -U scikit-learn
You can download the sourcecode for sklearn package from sklearn git. Download the appropriate version.
After downloading run python setup.py install to install the package
Related
I want to use prophet algorithm, but i cant import to my code,
Its giving me the following error;
pip install fbprophet
or
pip install prophet
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/prophet/
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/prophet/
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/prophet/
WARNING: Retrying (Retry(total=1, 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/prophet/
WARNING: Retrying (Retry(total=0, 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/prophet/
ERROR: Could not find a version that satisfies the requirement prophet
ERROR: No matching distribution found for prophet
Pip version: pip 20.3.3
pystan version : '2.19.1.1'
Earlier today my pip started exhibiting this very strange behavior where any pip install command timouts 5 times before the download starts. This is unaffected by the --default-timeout flag. For instance, doing pip install pandas I get
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(\<pip.\_vendor.urllib3.connection.HTTPConnection object at 0x7ff4b60badc0\>, 'Connection to pypi.cogtree.com timed out. (connect timeout=1.0)')': /cogtree/simple/pandas/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(\<pip.\_vendor.urllib3.connection.HTTPConnection object at 0x7ff4b60c7040\>, 'Connection to pypi.cogtree.com timed out. (connect timeout=1.0)')': /cogtree/simple/pandas/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(\<pip.\_vendor.urllib3.connection.HTTPConnection object at 0x7ff4b60c7250\>, 'Connection to pypi.cogtree.com timed out. (connect timeout=1.0)')': /cogtree/simple/pandas/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(\<pip.\_vendor.urllib3.connection.HTTPConnection object at 0x7ff4b60c7460\>, 'Connection to pypi.cogtree.com timed out. (connect timeout=1.0)')': /cogtree/simple/pandas/
Collecting pandas
Downloading pandas-1.4.1-cp38-cp38-macosx_10_9_x86_64.whl (11.4 MB)
|████████████████████████████████| 11.4 MB 6.9 MB/s
We would get the same exact result with connect timeout=10
I'm on
pip 21.2.4,
Python 3.8.8,
macOS 11.5.1,
and this is happening inside of a anaconda 4.11.0 virtual env with only default conda packages installed.
I've tried uninstalling and reinstalling pip, and conda. I can ping pypi.org fine. I tried this only multiple different wifi. Closing and reopening the terminal did not affect it either.
I'm trying to install the "pymoo" package in order to work on multi-objective optimization and when trying to install with the pip command: pip install pymoo I'm getting the retrying warnings:
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/pymoo/
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/pymoo/
And so on.. until the count runs out and I get the following error messages:
ERROR: Could not find a version that satisfies the requirement pymoo
ERROR: No matching distribution found for pymoo
I've tried installing by getting the code from GitHub and installing with pip install . , but it gives me the same error messages.
Is there anything I'm missing in the installation process?
I tried EVERYTHING I've seen from similar questions on stack overflow and nothing seems to work... It may matter that I'm on a secure work computer, connected to a secured network, but I don't know if that has to do with anything.
I've added to "...Python\Python38\Scripts" and "...Python\Python38" to "Path" (among others) in my computer's Environment Variables (Start -> "Edit Environment Variables").
Here is what's entered on command line, just "pip install numpy":
C:\Users\bs>pip install numpy
Collecting numpy
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip. vendor.urllib3.connection. VerifiedHTTPSConnection object at Ox00000290E22FF550>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None) after connection broken by 'ConnectTimeoutError(pip. vendor.ur11ib3.connection. VerifiedHTTPSConnection object at #x00000290E22FF040>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection. VerifiedHTTPSConnection object at Ox00000290E22FF6A0>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection. VerifiedHTTPSConnection object at Ox00000290E22FF820>, "Connection to pypi.org timed out. (connect timeout=15)')': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip. vendor.urllib3.connection. VerifiedHTTPSConnection object at Ox00000290E22FF9A0>, 'Connection to pypi.org timed out. (connect 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
My company has developed python packages and hosted them on a private Pypi repository. I wish to install these packages on a Google Colab notebook.
If they were on a public Pypi repository this would work:
!pip3 install --index-url=https://pypi.spotify.net/spotify/production confidence
however, it causes this error:
Looking in indexes: https://pypi.spotify.net/spotify/production
Collecting confidence
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0f9e601748>, 'Connection to pypi.spotify.net timed out. (connect timeout=15)')': /spotify/production/confidence/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0f9e601588>, 'Connection to pypi.spotify.net timed out. (connect timeout=15)')': /spotify/production/confidence/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0f9e6015f8>, 'Connection to pypi.spotify.net timed out. (connect timeout=15)')': /spotify/production/confidence/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0f9e601390>, 'Connection to pypi.spotify.net timed out. (connect timeout=15)')': /spotify/production/confidence/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f0f9e6012e8>, 'Connection to pypi.spotify.net timed out. (connect timeout=15)')': /spotify/production/confidence/
ERROR: Could not find a version that satisfies the requirement confidence (from versions: none)
ERROR: No matching distribution found for confidence
I suspect this is due to google Colab being a hosted notebook. This means that it is not connecting to Pypi via my work wifi, but from a google server.
You need to either:
make the package repository available to the public internet (unlikely that you'll actually want to do this)
connect Colaboratory to a local runtime: https://research.google.com/colaboratory/local-runtimes.html