解决linux的pypi源下载问题(pip is configured with locations that require TLS/SSL)

1.遇到这种情况说明pypi源配置的不能使用
  1. 解决方法如下:
[root@chen ~]mkdir ~/.pip
[root@chen ~]touch ~/.pip/pip.conf
[root@chen ~]vi ~/.pip/pip.conf
3.配置如下:
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host = mirrors.aliyun.com
4.最后就能解决啦,下载速度也变快了!

😇😇

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
It seems like you are experiencing an issue with pip being configured with locations that require TLS/SSL. This error usually occurs when pip is unable to establish a secure connection to the server. To resolve this issue, you can try the following steps: 1. Update pip: Make sure you have the latest version of pip installed by running the following command: ``` pip install --upgrade pip ``` 2. Check your internet connection: Ensure that you have a stable internet connection and try again. 3. Verify your SSL certificate: Ensure that your SSL certificate is valid and not expired. You can check this by opening a secure website in your browser. 4. Set the SSL certificate path: If you have a custom SSL certificate, you can set the path to it using the `REQUESTS_CA_BUNDLE` environment variable. Here's an example: ``` export REQUESTS_CA_BUNDLE=/path/to/certificate.crt ``` 5. Use a different mirror: Try using a different mirror to download packages. You can specify a mirror using the `-i` flag followed by the mirror URL. For example: ``` pip install -i https://pypi.org/simple package_name ``` 6. Disable SSL verification (not recommended): If none of the above solutions work and you're confident about the security of your network, you can disable SSL verification temporarily. However, this is not recommended as it poses security risks. To disable SSL verification, use the `--trusted-host` flag followed by the package server URL. For example: ``` pip install --trusted-host pypi.python.org package_name ``` If none of these solutions resolve the issue, please provide more details about your environment and any error messages you are receiving so that I can assist you further.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值