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

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

bash 复制代码
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

bash 复制代码
sudo yum install mysql-devel


04-安装mysqlclient

bash 复制代码
pipmy install mysqlclient

05-原因总结

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

相关推荐
btyzadt27 分钟前
虚拟机蓝屏问题排查与解决
linux·运维·网络
小李独爱秋1 小时前
UNIX发展历史与核心技术解析
服务器·操作系统·unix
佩佩(@ 。 @)1 小时前
网络编程-创建TCP协议服务器
服务器·网络·tcp/ip
蓝黑20201 小时前
阿里云ECS服务器搭建ThinkPHP环境
服务器·阿里云·thinkphp
G_H_S_3_1 小时前
【网络运维】Shell 脚本编程:while 循环与 until 循环
linux·运维·网络·shell
张鱼小丸子2 小时前
MySQL企业级部署与高可用实战
运维·数据库·mysql·云原生·高可用·mha·组从复制
时空自由民.3 小时前
linux下camera 详细驱动流程 OV02K10为例(chatgpt版本)
linux·运维·服务器
码界奇点3 小时前
Python内置函数全解析:30个核心函数语法、案例与最佳实践指南
linux·服务器·python
云川之下3 小时前
【网络】使用 DNAT 进行负载均衡时,若未配置配套的 SNAT,回包失败
运维·网络·负载均衡
ManageEngineITSM4 小时前
云原生环境下的ITSM新趋势:从传统运维到智能化服务管理
大数据·运维·人工智能·云原生·itsm·工单系统