question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CERTIFICATE_VERIFY_FAILED error when installing dependencies

See original GitHub issue

Hi,

I have installed pipenv for the first time on my system by following the fancy installation method (because I have excellent taste!) and the world was a happy place to live in.

Then I went on running the following given the project I started to work on did not know about the wonders of pipenv:

pipenv install -r a_folder/requirements.txt

But then, suddenly the world was a sad place to live in. I got the following:

Requirements file provided! Importing into Pipfile…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Traceback (most recent call last):
  File "/Users/my_user/.local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/Users/my_user/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/my_user/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/my_user/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/my_user/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/my_user/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/my_user/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 1785, in install
    do_init(dev=dev, allow_global=system, ignore_pipfile=ignore_pipfile, system=system, skip_lock=skip_lock, verbose=verbose, concurrent=concurrent, deploy=deploy)
  File "/Users/my_user/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 1293, in do_init
    do_lock(system=system)
  File "/Users/my_user/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 1083, in do_lock
    pre=pre
  File "/Users/my_user/.local/venvs/pipenv/lib/python2.7/site-packages/pipenv/utils.py", line 450, in resolve_deps
    r = requests.get('https://pypi.org/pypi/{0}/json'.format(name))
  File "/Users/my_user/.local/venvs/pipenv/lib/python2.7/site-packages/requests/sessions.py", line 521, in get
    return self.request('GET', url, **kwargs)
  File "/Users/my_user/.local/venvs/pipenv/lib/python2.7/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/my_user/.local/venvs/pipenv/lib/python2.7/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/Users/my_user/.local/venvs/pipenv/lib/python2.7/site-packages/requests/adapters.py", line 506, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /pypi/idna/json (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)'),))

Is this expected?

Here’s some more info which I hope it will be useful:

$ pipenv --venv
/Users/my_user/.local/share/virtualenvs/the_project_folder-kENjJPUz

$ pipenv --version
pipenv, version 8.2.6

$ pipenv run python --version
Python 2.7.14

$ python --version
2.7.10

# My requirements.txt file
boto==2.48.0
fabric==1.14.0

# My automatically-generated Pipenv file
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[dev-packages]

[packages]

boto = "==2.48.0"
fabric = "==1.14.0"

OS is macOS Sierra 10.12.4.

Anything you need to help troubleshoot this just let me know.

Thanks!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
erinxoconcommented, Oct 5, 2017

@walterdolce No problem! @nateprewitt saves the day! Also thank you so much for using that gif.

3reactions
walterdolcecommented, Oct 5, 2017

@nateprewitt Hmmmm good catch! I am indeed currently behind the company network which has various layers of security a request has to go through.

I just tried this while connected to the mobile hotspot and…

Requirements file provided! Importing into Pipfile…
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (e97738)!
Installing dependencies from Pipfile.lock (e97738)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 12/12 — 00:00:13
To activate this project's virtualenv, run the following:
 $ pipenv shell

I shall raise this internally to fix. Thanks both @erinxocon @nateprewitt for the speedy responses and help provided!

Read more comments on GitHub >

github_iconTop Results From Across the Web

pip install fails with "connection error: [SSL - Stack Overflow
--trusted-host used to resolve the "'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate ...
Read more >
Installation - Tableau Open Source
Error: SSL CERTIFICATE_VERIFY_FAILED. The setup.py installation script requires internet connectivity to download the dependencies. You might see the errors, ...
Read more >
pip install fails with ssl.SSLError - Google Groups
Hi, I'm trying to install the driver for Python 3.4 on a linux system in our lab. Other pip installs have worked fine....
Read more >
How to fix - Python pip install connection error SSL ... - Jhooq
How to fix - Python pip install connection error SSL CERTIFICATE_VERIFY_FAILED certificate verify failed · 1. Root Cause of the problem · 2...
Read more >
HTTPS Certificates - pip documentation v22.3.1
This error means that OpenSSL wasn't able to find a trust anchor to verify the chain against. Using system trust stores instead of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found