首页 > 解决方案 > 使用 pip 安装模块

问题描述

我正在尝试使用 pip 安装 python 模块,但出现以下错误

我尝试使用 anaconda 提示符安装它并且成功并且能够在 jupyter notebook 中使用但我无法在 python 中使用它

甚至升级了 python 和 pip

我正在使用 python 版本 3.7.2

Microsoft Windows [版本 6.1.7600] 版权所有 (c) 2009 Microsoft Corporation。版权所有。

C:\Program Files\Python>pip install pytube
pip is configured with locations that require TLS/SSL, however the ssl module in
 Python is not available.
Collecting pytube
  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 SS
L module is not available.")': /simple/pytube/
  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 SS
L module is not available.")': /simple/pytube/
  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 SS
L module is not available.")': /simple/pytube/
  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 SS
L module is not available.")': /simple/pytube/
  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 SS
L module is not available.")': /simple/pytube/
  Could not fetch URL https://pypi.org/simple/pytube/: There was a problem confi
rming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max r
etries exceeded with url: /simple/pytube/ (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 pytube (from versions:
 )
No matching distribution found for pytube
pip is configured with locations that require TLS/SSL, however the ssl module in
 Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming
 the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retrie
s exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS UR
L because the SSL module is not available.")) - skipping

标签: pythonpip

解决方案


推荐阅读