Answer the question
In order to leave comments, you need to log in
Why can't python download packages?
I run the installation sudo python setup.py install
In the process, the following lines appear:Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for stratum>=0.2.15
error: Could not find suitable distribution for Requirement.parse('stratum>=0.2.15')
There are suspicions that the error is due to http and not https , but how to fix it?
Internet connection is normal.
Answer the question
In order to leave comments, you need to log in
This is to be expected, since pypi recently disabled http support and all requests should now go to https://pypi.python.org. You most likely have the old setuptools library installed. I advise you to update it pip install -U setuptools
(if you have Linux, it is better to use the built-in package manager (yum, apt-get, apk, etc.) to install a more recent version of setuptools). Better yet, install pip and install the package with pip install -U name
. In the latest (2.7.9+, 3.4x+) you can say python -mensurepip
, which will install more or less modern versions of setuptools and pip.
Your suspicion is most likely correct, since wget complains when downloading this URL:
--2017-11-09 12:30:39-- http://pypi.python.org/simple/
Resolving pypi.python.org (pypi.python.org)... 151.101.36.223
Connecting to pypi.python.org (pypi.python.org)|151.101.36.223|:80... connected.
HTTP request sent, awaiting response... 403 SSL is required
2017-11-09 12:30:39 ERROR 403: SSL is required.
Googled this error and came across here. The correct answer is here .
Too lazy to reap: Update distribute_setup.py
50 DEFAULT_URL = "https://pypi.python.org/packages/source/d/distribute/"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question