centos 7 pip install MySQL-python 报错
pip install MySQL-python 报错
pip install MySQL-python
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, . Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Looking in indexes: http://mirrors.cloud.aliyuncs.com/pypi/simple/
Collecting MySQL-python
Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip (108kB)
|████████████████████████████████| 112kB .4MB/s
ERROR: Complete output from command python setup.py egg_info:
ERROR: sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line , in <module>
File "/tmp/pip-install-kfRwp2/MySQL-python/setup.py", line , in <module>
metadata, options = get_config()
File "setup_posix.py", line , in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line , in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code in /tmp/pip-install-kfRwp2/MySQL-python/
WARNING: You are using pip version 19.1., however version 19.3. is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
网上看需要安装python-devel mysql-devel 等
尝试 yum install python-devel mysql-devel ,mysql-devel有依赖问题,有如下报错
---> Package libss.x86_64 :1.42.-.el7 will be an update
Removing mariadb-libs.x86_64 :5.5.-.el7 - u due to obsoletes from installed mysql-community-libs-5.6.-.el7.x86_64
base//x86_64/filelists_db | 7.3 MB ::
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mariadb-libs.x86_64 :5.5.-.el7 will be installed
--> Processing Dependency: mariadb-libs(x86-) = :5.5.-.el7 for package: :mariadb-devel-5.5.-.el7.x86_64
--> Finished Dependency Resolution
Error: Package: :mariadb-devel-5.5.-.el7.x86_64 (base)
Requires: mariadb-libs(x86-) = :5.5.-.el7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
网上的建议是直接去mysql官网下载对应版本的MySQL-devel


上传rpm包MySQL-devel-5.6.46-1.el7.x86_64.rpm到服务器,之后通过命令安装mysql-devel
yum install MySQL-devel-5.6.-.el7.x86_64.rpm -y
之后跑pip install MySQL-python 还有报错, 看了报错,好像还得需要一个MySQL-python
yum install MySQL-python -y
之后运行pip install MySQL-python成功
总结:
下次安装的时候先运行如下,试试,有报错,再查看
yum install python-devel mysql-devel zlib zlib-devel openssl-devel MySQL-python -y pip install MySQL-python
centos 7 pip install MySQL-python 报错的更多相关文章
- pip install cv2 安装报错
pip install cv2 安装报错是一个常见现象: ERROR: Could not find a version that satisfies the requirement cv2 (fro ...
- python pip install XXX出现报错问题
重装Anacondas后,将pip 和python.exe路径加入到环境变量后直接在cmd窗口进行pip 操作,报错如下 报错内容为: pip is configured with locations ...
- Python3.6.2安装pip install paramike模块报错
问题描述: 在有几台电脑上pip install paramike报错 报错内容: Could not find a version that satisfies the requirement sq ...
- centos安装pip,zipimport.ZipImportError报错
安装pip下载pip安装包wget https://bootstrap.pypa.io/get-pip.py 执行以下报错 python get-pip.py ##报错内容(zipimport.Zip ...
- pip install selenium==版本号 报错
安装selenium是注意不要带版本号直接用如下命令: pip install selenium
- pip install urllib3[secure] 报错 error: ffi.h: No such file or directory
解决 sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging pyt ...
- python 3.5.2安装mysql驱动报错
python 3.5.2安装mysql驱动报错 python 3.5.2安装mysql驱动时出现如下异常: [root@localhost www]# pip install mysql-connec ...
- mysql select 报错
代码片段: sql_url = "select * from webpage where url = '%s'" % b try: cursor.execute(sql_url) ...
- Python报错module 'scipy.misc' has no attribute 'xxx'
Python报错module 'scipy.misc' has no attribute 'imresize' 解决办法: 安装Pillow包,命令如下: pip install Pillow 然后重 ...
随机推荐
- claim、claimsidentity、claimsprincipal
Claim表示一个声明单元,它用来组成ClaimsIdentity.ClaimsIdentity表示一个证件,例如身份证,身份证上面的名字表示一个Claim,身份证号也表示一个Claim,所有这些Cl ...
- [PAT] A1020 Tree Traversals
[题目] distinct 不同的 postorder 后序的 inorder 中序的 sequence 顺序:次序:系列 traversal 遍历 题目大意:给出二叉树的后序遍历和中序遍历,求层次遍 ...
- CF573E Bear and Bowling(6-1)
题意 洛谷 做法一 考虑一种贪心(先别管对不对),设当前已选择的集合为\(A\),这是考虑该集合的补集,每个元素加进来后的增量为\(V_i\),则挑选最大的那个加入该集合 结论1:遵循上述贪心,\(\ ...
- A Bug's Life____并查集
English preparation: falsify 伪造:篡改:歪曲:证明...虚假 the sexual behavior of a rare species of bugs. 一种稀 ...
- 题解 AT4278 【[ABC115A] Christmas Eve Eve Eve】
题目传送门. 分析 根据题目,我们可以发现要求如下: \(d\)的值 输出 \(d=25\) Christmas \(d=24\) Christmas Eve \(d=23\) Christmas E ...
- 生产环境容器落地最佳实践 --JFrog 内部K8s落地旅程
引言 Kubernetes已经成为市场上事实上领先的编配工具,不仅对技术公司如此,对所有公司都是如此,因为它允许您快速且可预测地部署应用程序.动态地伸缩应用程序.无缝地推出新特性,同时有效地利用硬件资 ...
- 你写的 Python 代码总是不规范?用它!
今天咱们来说说 代码风格 ! 不同的编程语言 有不同的代码风格 Python 的代码规范 就是人们常说的 PEP8 在这个网站 https://www.python.org ...
- Dubbo服务暴露分析
Dubbo的服务暴露是一个重要的特性,了解其机制很重要.之前有很多人写了有关的源代码分析,在本文中不再重新分析.官方文档中的一篇写的就很好,本文主要是有关内容进行补充与总结. 传送门:服务导出 为什么 ...
- Visual Studio 问题汇总
VS2019 16.3.6 1 JSON 文件没有进行格式化验证 开发时运行正常,部署在IIS中有错误提示. 2 .NET Core 3.0 没有提供中文包 所有注释都是英文的.
- Tram POJ - 1847 spfa
#include<iostream> #include<algorithm> #include<queue> #include<cstdio> #inc ...