1

I was trying to install a Python package but showed an error as below, I think it might be because I used my company's laptop and it got censored, but I am not sure whether that is the reason, if there are any other possible solutions please help. Python 3.7 pip 10.0.1

(base) C:\>pip install pyvis
Collecting pyvis
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/pyvis/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/pyvis/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/pyvis/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/pyvis/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))': /simple/pyvis/
  Could not fetch URL https://pypi.org/simple/pyvis/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pyvis/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))) - skipping
  Could not find a version that satisfies the requirement pyvis (from versions: )
No matching distribution found for pyvis
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)'))) - skipping

2 Answers 2

3

Try the following command.

pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pip --trusted-host pypi.org pyvis -vvv
11
  • hi @CForce99, thanks for the answer, after I typed first command, it is showing:tensorboard 2.3.0 has requirement setuptools>=41.0.0, but you'll have setuptools 40.2.0 which is incompatible. google-auth 1.22.0 has requirement setuptools>=40.3.0, but you'll have setuptools 40.2.0 which is incompatible.
    – XaviorL
    Commented Oct 14, 2020 at 23:11
  • how should I get the new setuptools?
    – XaviorL
    Commented Oct 14, 2020 at 23:12
  • 1
    pip install --upgrade setuptools will do the trick for what I know
    – Asra
    Commented Oct 14, 2020 at 23:17
  • @XaviorL did you try --upgrade setuptools? Commented Oct 14, 2020 at 23:22
  • I tried and got same issue: >pip install --upgrade setuptools
    – XaviorL
    Commented Oct 14, 2020 at 23:39
0

Based on your comments try: pip install --upgrade setuptools

Then try retry: pip install pyvis

4
  • Your answer does not answer the ssl error, the right way to add to an answer is to edit the orignal one. Commented Oct 14, 2020 at 23:23
  • For what I know, the ssl error might be caused by pypi rejecting the older version, but you may very well be right.
    – Asra
    Commented Oct 15, 2020 at 0:47
  • You are right but he can't update setuptools becuase of the ssl error. Commented Oct 15, 2020 at 0:56
  • Then I think the solution may be to download the files from the setuptools pypi repo and use then manually
    – Asra
    Commented Oct 15, 2020 at 0:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.