求助:ubuntu在使用pycharm进行清华源下载package的时候出现了错误

在Ubuntu系统下使用PyCharm时,通过清华源安装特定的大包如TensorFlow时出现SSL证书验证错误,导致无法下载。已尝试多种解决方法包括重新编译Python,但仅能使用默认源。
部署运行你感兴趣的模型镜像

ubuntu在使用pycharm进行清华源下载package的时候出现了问题

** 问题 **

在Ubuntu系统下使用pycharm在清华源下载packages时弹出下面错误:
在这里插入图片描述

版本选用的是Python3.6,Ubuntu好像是14.0几来着

** 问题描述和采用过的解决方法 **

1.无论是清华源还是阿里源/豆瓣都出现了同样问题,但默认源没问题,但太慢了(本来就是想下载tensorflow这个package,等了一个多小时,最后失败了,所以不能只用默认源)
2.无论是哪个package,都出现了同样的错误,小的默认源也能用,但例如tensorflow这种实在没办法…
3.看网上有遇到同样问题的,但是是默认源的,要么是重新编译Python(用–with-ssl或者是修改setup.py的文件一系列操作),要么是选择使用清华源就行了…
ps:重新编译Python的两种方法我都试过了,我甚至下载了一个Python3.7配置新环境,但是还是只能使用默认源.

错误提示

错误的代码如下:

Executed command:

pip install --index-url https://pypi.tuna.tsinghua.edu.cn/simple/ tensorflow==2.4.0rc0

Error occurred:

ERROR: Could not find a version that satisfies the requirement tensorflow==2.4.0rc0 (from versions: none)

proposed solution:

Try to run this command from the system terminal. Make sure that you use the correct version of 'pip' installed for your Python interpreter located at '***********/env/GOAD-master/bin/python'.

command output:

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Could not fetch URL https://pypi.tuna.tsinghua.edu.cn/simple/tensorflow/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.tuna.tsinghua.edu.cn', port=443): Max retries exceeded with url: /simple/tensorflow/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

DEPRECATION: The -b/--build/--build-dir/--build-directory option is deprecated. pip 20.3 will remove support for this functionality. A possible replacement is use the TMPDIR/TEMP/TMP environment variable, possibly combined with --no-clean. You can find discussion regarding this at https://github.com/pypa/pip/issues/8333.
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/tensorflow/
WARNING: 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/tensorflow/
WARNING: 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/tensorflow/
WARNING: 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/tensorflow/
WARNING: 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/tensorflow/
ERROR: Could not find a version that satisfies the requirement tensorflow==2.4.0rc0 (from versions: none)
ERROR: No matching distribution found for tensorflow==2.4.0rc0

您可能感兴趣的与本文相关的镜像

TensorFlow-v2.15

TensorFlow-v2.15

TensorFlow

TensorFlow 是由Google Brain 团队开发的开源机器学习框架,广泛应用于深度学习研究和生产环境。 它提供了一个灵活的平台,用于构建和训练各种机器学习模型

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值