如何解决警告:pip配置了需要TLS / SSL的位置,但是Python中的ssl模块不可用如何在kali linux中解决它
我在kali linux中下载模块时遇到错误。
pip3 install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
WARNING: pip is configured with locations that require TLS/SSL,however the ssl module in Python is not available.
WARNING: 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/certifi/
WARNING: Retrying (Retry(total=3,status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/certifi/
WARNING: Retrying (Retry(total=2,status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/certifi/
WARNING: Retrying (Retry(total=1,status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/certifi/
WARNING: Retrying (Retry(total=0,status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/certifi/
Could not fetch URL https://pypi.org/simple/certifi/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org',port=443): Max retries exceeded with url: /simple/certifi/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement certifi==2020.4.5.1 (from -r requirements.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for certifi==2020.4.5.1 (from -r requirements.txt (line 1))
WARNING: 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 retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
解决方法
如果使用Windows,请确保在Windows环境变量中添加了以下三个路径:
- .... \\ Anaconda \ Library \ bin
- .... \\ Anaconda \ Scripts
- .... \ Anaconda
如果不使用Anaconda,则代替Anaconda,即安装python的路径。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。