pip-由于SSL错误,无法安装jupyter笔记本

时间:2019-03-04 19:41:54

标签: python-3.x pip jupyter-notebook

我已经在Windows 10系统上安装了Anaconda3,但是由于某种原因,所有脚本似乎都不起作用!

因此,为了安装jupyter笔记本,我尝试使用pip进行如下操作:

python -m pip install jupyter notebook

但是我一直遇到以下错误:

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting jupyter
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/jupyter/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/jupyter/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/jupyter/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/jupyter/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/jupyter/
  Could not fetch URL https://pypi.org/simple/jupyter/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/jupyter/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
  Could not find a version that satisfies the requirement jupyter (from versions: )
No matching distribution found for jupyter

我已经尝试了StackOverflow上这篇文章中建议的所有内容: pip install fails with "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)" ...但无济于事。 :(

我还尝试了Google搜索错误并提出了ZIP!

请给我帮助!

1 个答案:

答案 0 :(得分:0)

由于您已经有anaconda,最好直接使用conda。运行conda install notebook。我还建议通过conda update pip更新点数。在运行任何conda命令之前,请确保activate的conda环境。