When I run pipenv install
I get the a stack trace ending in
OpenSSL.SSL.Error: [('system library', 'fopen', 'No such file or directory'), ('BIO routines', 'BIO_new_file', 'no such file'), ('x509 certificate routines', 'X509_load_cert_crl_file', 'system lib')]
This may be caused by the bundled requests
module (v2.13) missing a cacert.pem
file... see requests/requests#4019 ("OpenSSL issue when vendoring requests"). I can confirm that trying import requests; requests.get(...)
with pipenv/vendor/requests
on my path causes the error above while the same command using my system-wide requests
(v2.14.2) does not.
Related: #387 ("Strange error after upgrade on ubuntu 16.04")
I had the same issue on ubuntu 16.04. It started when I installed certbot (Lets Encrypt certificate management tool) and fixed itself when I uninstalled it with sudo apt-get --purge certbot && sudo apt-get autoremove
I am not sure which package specifically causes the issue, it could be the bundled requests package in their repo or it could be that it requires python-openssl to be installed (which was then removed when I ran autoremove).
Hopefully this helps someone figure out the actual issue as this error is really annoying.
From what I remember when troubleshooting a few weeks ago, cacert.pem
wasn't present in my installed version of pipenv; however, since I see it is present in the repo here, I suspect the issue might be that it's not being bundled into the pipenv wheel / uploaded to PyPI...
aha! Thanks @msegado, it is in our repo, but it isn't being bundled as you can see by inspecting the 5.1.0 archive. This is an issue with our release process. I believe we'll need to add an entry to MANIFEST.in to include cacert.pem
.
Alright, I've pushed 35518da to address this.
~@msegado and @aeleos, feel free to try installing the master branch and seeing if you're still experiencing the issue. If not, this will be included in our next release.~
Ignore the above, this won't be testable until we push a new sdist release since this revolves around bundling there.
For an immediate workaround, find the pipenv
directory under your Python installation's site-packages
directory, cd
into it, and then:
cd vendor/requests
wget https://raw.githubusercontent.com/kennethreitz/pipenv/master/pipenv/vendor/requests/cacert.pem
@iamthad this should already be resolved in the latest release. Are you still experiencing issues?
I just installed pipenv ~2.5 hours ago and had this issue. I'll double-check that I got the latest release.
EDIT: I have confirmed I have pipenv version 5.1.2 installed and I needed to fetch that cacert.pem
manually.
On Jul 6, 2017, at 09:36, Nate Prewitt notifications@github.com wrote:
@iamthad this should already be resolved in the latest release. Are you still experiencing issues?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
I can confirm that I also have 5.1.2 and ran into this issue.
Sorry, this issue should have been updated with #434. Archives were properly fixed in 5.1.2 but there was still an outstanding issue with wheels. I've pushed 06acad1 which will fix this in the next release.
Just reinstalled latest version pipenv on a new Fedora 26 server and ran into this issue again.
Just installed pipenv on OSX El Capitan, Python from homebrew, and ran into this issue.
This now happens to me with 9.0.3 version, brew python and osx. BUT only when i run pipenv update
. on normal install it works fine. any ideas?
Most helpful comment
For an immediate workaround, find the
pipenv
directory under your Python installation'ssite-packages
directory,cd
into it, and then: