Reputation: 2093
I'm getting the SSL error when trying to install a module using pip and I've looked around on the net and found the common solution for that problem:
C:\Python35> pip3 install --index-url=http://pypi.python.org/simple/ --trusted-host pypi.python.org sphinx
However, running this command did not work as I thought. What am I doing wrong?
C:\Python35> pip3 install --index-url=http://pypi.python.org/simple/ --trusted-host pypi.python.org -vvv sphinx
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Collecting sphinx
1 location(s) to search for versions of sphinx:
* http://pypi.python.org/simple/sphinx/
Getting page http://pypi.python.org/simple/sphinx/
Starting new HTTP connection (1): pypi.python.org
"GET /simple/sphinx/ HTTP/1.1" 403 16
Could not fetch URL http://pypi.python.org/simple/sphinx/: 403 Client Error: SSL is required for url: http://pypi.python.org/simple/sphinx/ - skipping
Could not find a version that satisfies the requirement sphinx (from versions: )
Cleaning up...
No matching distribution found for sphinx
Exception information:
Traceback (most recent call last):
File "C:\python35\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\python35\lib\site-packages\pip\commands\install.py", line 324, in run
requirement_set.prepare_files(finder)
File "C:\python35\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "C:\python35\lib\site-packages\pip\req\req_set.py", line 554, in _prepare_file
require_hashes
File "C:\python35\lib\site-packages\pip\req\req_install.py", line 278, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "C:\python35\lib\site-packages\pip\index.py", line 514, in find_requirement
'No matching distribution found for %s' % req
pip.exceptions.DistributionNotFound: No matching distribution found for sphinx
As Mukul Sharma wrote, using
C:\Python35>pip3 install --index-url=https://pypi.python.org/simple/ --trusted-host pypi.python.org -vvv sphinx
instead fixed my problem.
Upvotes: 1
Views: 1439
Reputation: 562
Python has stopped support on requests using HTTP. They are only allowing requests over HTTPS. You can read more about it here.
Just use https instead of http here:
C:\Python35> pip3 install --index-url=https://pypi.python.org/simple/ --trusted-host pypi.python.org sphinx
Upvotes: 2