解决:pip is configured with locations that require TLS/SSL,the ssl module in Python is not available

Windows版

        出错提示表示当前python缺少SSL模块,pip默认安装源为https://pypi.org/simple/,连接是需要SSL库,写配置文件修改为阿里安装源。

pip config --global set global.index-url http://mirrors.aliyun.com/pypi/simple/

        观察到配置被写入以下文件:

        记事本打开pip.ini文件,在末行添加

[install]
trusted-host = mirrors.aliyun.com

        重新pip即可成功。

当你看到警告信息 "pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available" 时,这意味着你的Python环境缺少SSL模块,导致pip无法正常使用TLS/SSL。这可能是由于你的Python版本不满足要求或者缺少相关依赖库所导致的。 解决这个问题有几种方案: 1. 升级Python版本: 如果你的Python版本过旧,可以尝试升级到较新的版本,因为较新的Python版本通常会自带SSL模块。 2. 安装依赖库: 检查你的系统是否缺少必要的依赖库,例如OpenSSL。你可以尝试安装相应的依赖库,然后重新编译和安装Python。 3. 使用虚拟环境: 如果你不想改变全局Python环境,你可以考虑使用虚拟环境来管理你的项目。虚拟环境可以独立于全局Python环境进行配置,从而避免了全局环境的影响。 综上所述,你可以尝试升级Python版本、安装相关依赖库或者使用虚拟环境来解决 "pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available" 这个问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [解决 pip is configured with locations that require TLS/SSL, however the ssl module in Python is not](https://blog.csdn.net/qq_49580107/article/details/126380616)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] - *3* [pip is configured with locations that require TLS/SSL](https://blog.csdn.net/TomorrowAndTuture/article/details/119989736)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值