安裝pyspark時報錯——Could not fetch URL https://pypi.org/simple/pyspark/
阿新 • • 發佈:2022-03-01
報錯如下:
Could not fetch URL https://pypi.org/simple/pyspark/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pyspark/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skippingCould not find a version that satisfies the requirement pyspark (from versions: ) No matching distribution found for pyspark 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
解決辦法;
pip3 install pyspark -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
ps:linux中安裝的時python3.6版本,所以使用pip3
1)http://mirrors.aliyun.com/pypi/simple/ 阿里雲
2)https://pypi.mirrors.ustc.edu.cn/simple/ 中國科技大學
3) http://pypi.douban.com/simple/ 豆瓣
4) https://pypi.tuna.tsinghua.edu.cn/simple/ 清華大學
5) http://pypi.mirrors.ustc.edu.cn/simple/ 中國科學技術大學