Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install package failed due to SSL error #2494

Closed
nlamirault opened this issue Mar 6, 2015 · 10 comments
Closed

Install package failed due to SSL error #2494

nlamirault opened this issue Mar 6, 2015 · 10 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@nlamirault
Copy link

i try to install a package:

$ /home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/bin/pip -v install -r Flask
Starting new HTTPS connection (1): pypi.python.org
There was an error checking the latest version of pip
Traceback (most recent call last):
  File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/utils/outdated.py", line 126, in pip_version_check
    headers={"Accept": "application/json"},
  File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/_vendor/requests/sessions.py", line 473, in get
    return self.request('GET', url, **kwargs)
  File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/download.py", line 365, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/_vendor/requests/sessions.py", line 461, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/_vendor/requests/sessions.py", line 573, in send
    r = adapter.send(request, **kwargs)
  File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/_vendor/cachecontrol/adapter.py", line 43, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/_vendor/requests/adapters.py", line 431, in send
    raise SSLError(e, request=request)
SSLError: [Errno 185090057] _ssl.c:330: error:0B084009:x509 certificate routines:X509_load_cert_crl_file:PEM lib
Could not open requirements file: [Errno 2] No such file or directory: 'Flask'
Exception information:
Traceback (most recent call last):
  File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/basecommand.py", line 232, in main
    status = self.run(options, args)
  File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/commands/install.py", line 321, in run
    finder=finder, options=options, session=session):
  File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/req/req_file.py", line 31, in parse_requirements
    session=session,
  File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/download.py", line 408, in get_file_content
    'Could not open requirements file: %s' % str(exc)
InstallationError: Could not open requirements file: [Errno 2] No such file or directory: 'Flask'

With option --trusted-host it works :

 /home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/bin/pip -v install Flask --trusted-host pypi.python.org
Starting new HTTPS connection (1): pypi.python.org
"GET /pypi/pip/json HTTP/1.1" 200 36096
Collecting Flask
  Getting page https://pypi.python.org/simple/flask/
  Starting new HTTPS connection (1): pypi.python.org
  "GET /simple/flask/ HTTP/1.1" 200 672
  URLs to search for versions for Flask:
  * https://pypi.python.org/simple/flask/
  Getting page https://pypi.python.org/simple/flask/
  "GET /simple/flask/ HTTP/1.1" 200 672
  Analyzing links from page https://pypi.python.org/simple/flask/
    Found link https://pypi.python.org/packages/source/F/Flask/Flask-0.1.tar.gz#md5=d0c458397c49114fa279716798ca80c8 (from https://pypi.python.org/simple/flask/), version: 0.1

Any idea ?
I'm using pip 6.0.8 on Python 2.6
Thanks

@pfmoore
Copy link
Member

pfmoore commented Mar 6, 2015

The failed run did -r Flask, the successful one just had Flask (no -r). Isn't that the issue? It's what I'd understand by InstallationError: Could not open requirements file: [Errno 2] No such file or directory: 'Flask'. I'm not sure the SSL error is relevant here.

@nlamirault
Copy link
Author

Sorry for previous log. It's the output :

$ /home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/bin/pip -v install Flask
Collecting Flask
  Getting page https://pypi.python.org/simple/flask/
  Starting new HTTPS connection (1): pypi.python.org
  Could not fetch URL https://pypi.python.org/simple/flask/: connection error: [Errno 185090057] _ssl.c:330: error:0B084009:x509 certificate routines:X509_load_cert_crl_file:PEM lib
  Will skip URL https://pypi.python.org/simple/flask/ when looking for download links for Flask
  URLs to search for versions for Flask:
  * https://pypi.python.org/simple/flask/
  Getting page https://pypi.python.org/simple/flask/
  Starting new HTTPS connection (2): pypi.python.org
  Could not fetch URL https://pypi.python.org/simple/flask/: connection error: [Errno 185090057] _ssl.c:330: error:0B084009:x509 certificate routines:X509_load_cert_crl_file:PEM lib
  Will skip URL https://pypi.python.org/simple/flask/ when looking for download links for Flask
  Could not find any downloads that satisfy the requirement Flask
  Cleaning up...
  No distributions at all found for Flask
  Exception information:
  Traceback (most recent call last):
    File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/basecommand.py", line 232, in main
      status = self.run(options, args)
    File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/commands/install.py", line 339, in run
      requirement_set.prepare_files(finder)
    File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/req/req_set.py", line 333, in prepare_files
      upgrade=self.upgrade,
    File "/home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/lib/python2.6/site-packages/pip/index.py", line 397, in find_requirement
      'No distributions at all found for %s' % req
  DistributionNotFound: No distributions at all found for Flask

And it works using :

$ /home/vagrant/Cloud/git/nimbus-dashboard/.tox/pep8/bin/pip -v install Flask --trusted-host pypi.python.org

@msabramo
Copy link
Contributor

msabramo commented Mar 7, 2015

It looks like there's something wrong with your CA certificates possibly. Do you have a file at /etc/ssl/certs/ca-certificates.crt?

See http://stackoverflow.com/questions/6824332/mercurial-ssh-certificate-issue

@jayvdb
Copy link

jayvdb commented Jun 7, 2015

I can reproduce this on py 2.6.5 , found while debugging a failure to get-pip.py on Appveyor

https://ci.appveyor.com/project/jayvdb/pywikibot-core/build/1.0.appveyor-more-versions.261/job/y9cd8r87nh23pm6t

It doesnt happen on py 2.6.6 for me.

@jayvdb
Copy link

jayvdb commented Jun 21, 2015

Should the docs be updated to say that py 2.6.5 is not supported?

jayvdb added a commit to jayvdb/python-appveyor-demo that referenced this issue Aug 1, 2015
Use --no-clean option to workaround bug in pip.
pypa/pip#2494

Fixes ogrisel#15
jayvdb added a commit to jayvdb/python-appveyor-demo that referenced this issue Aug 3, 2015
Use pip --user option to workaround issue during cleanup.
pypa/pip#2494

Fixes ogrisel#15
@jayvdb
Copy link

jayvdb commented Jan 7, 2016

Either #1087 (wont fix / needs code) or #3336 (PR pending) might provide a workaround for this problem.

@asottile
Copy link
Contributor

asottile commented Feb 7, 2016

I'm getting a very similar error under pypy: https://travis-ci.org/pre-commit/pre-commit/jobs/107623837

(In my case, the workaround was to install virtualenv<14 which limits pip to a lower version)

@xavfernandez
Copy link
Member

It seems it is failing on return self.request('GET', url, **kwargs) what are the used url and kwargs ?

It looks more like a certificate/openssl installation issue than a pip issue...

Cf https://github.com/kennethreitz/requests/issues/557 for possible solutions.

@asottile
Copy link
Contributor

asottile commented Feb 7, 2016

My issue seems fixed by pypa/virtualenv#866

@xavfernandez
Copy link
Member

Great, and the documentation now states that we only support the latest patch version of our supported python versions so closing this.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

6 participants