在新的服务器上成功安装mysqlclient的方法【解决No matching distribution found for mysqlclient的问题】

58 篇文章 10 订阅
17 篇文章 0 订阅

前言:在某台Centos服务器上安装mysqlclient时一直报下面的错:

WARNING: Discarding https://mirrors.aliyun.com/pypi/packages/6a/91/bdfe808fb5dc99a5f65833b370818161b77ef6d1e19b488e4c146ab615aa/mysqlclient-1.3.0.tar.gz#sha256=06eb5664e3738b283ea2262ee60ed83192e898f019cc7ff251f4d05a564ab3b7 (from https://mirrors.aliyun.com/pypi/simple/mysqlclient/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement mysqlclient (from versions: 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11rc1, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.4.0rc1, 1.4.0rc2, 1.4.0rc3, 1.4.0, 1.4.1, 1.4.2, 1.4.2.post1, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0rc1, 2.1.0, 2.1.1, 2.2.0rc1, 2.2.0)
ERROR: No matching distribution found for mysqlclient

这篇博文就来解决这个“ No matching distribution found for mysqlclient”的问题,并记录下整个过程。

01-在同一服务商的同一机房开一台新的主机

02-卸载掉预装的Python3.6,安装好Python3.9,并建立Pyhon3.9和pip3的软链接

详情请参考 https://blog.csdn.net/wenhao_ir/article/details/134294656

03-安装MySQL开发依赖库mysql-devel

sudo yum install mysql-devel

在这里插入图片描述
在这里插入图片描述

04-安装mysqlclient

pipmy install mysqlclient

在这里插入图片描述

05-原因总结

我觉得之前失败的最大原因是我没有把系统预装的Python3.6卸载掉。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值