pip install lxml mysql-python error
问题0:
在安装 mysql-python时,会出现:

sh: mysql_config: not found
Traceback (most recent call last):
File "setup.py", line 15, in <module>
metadata, options = get_config()
File "/home/zhxia/apps/source/MySQL-python-1.2.3/setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "/home/zhxia/apps/source/MySQL-python-1.2.3/setup_posix.py", line 24, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found

只要原因是没有安装:libmysqlclient-dev
sudo apt-get install libmysqlclient-dev
找到mysql_config文件的路径
sudo updatedb
locate mysql_config
mysql_config的位置为:/usr/bin/mysql_config
在mysql-python源码包下找到:setup_posix.py 文件,然后找到文件中的 mysql_config.path 将其值改为:/usr/bin/mysql_config,然后 sudo python setup.py install ,就ok了
问题1:
ERROR: /bin/sh: 1: xslt-config: not found
make sure the development packages of libxml2 and libxslt are installed **
参考:
http://stackoverflow.com/questions/5178416/pip-install-lxml-error
http://stackoverflow.com/questions/21489720/installing-pyquery-via-pip
解决:
apt-get install libxslt1-dev
问题2:
error: Setup script exited with error: command 'gcc' failed with exit status 1
通过安装如下库即可解决:
sudo apt-get install python-dev
pip install lxml mysql-python error的更多相关文章
- pip install lxml出错解决
初学Python各种版本问题,安装pip install lxml各种出错,解决方法:py -2 -m pip install wheel(PY3上我上个帖子已经标了),http://www.lfd. ...
- Pip install lxml centOSFailed building wheel for lxml
转到虚拟环境目录:yum install libxslt-devel libxml2-devel yum install python-devel pip install lxml
- Python: Win7下使用 pip install lxml 无法安装lxml?
1.在网址 http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml 下,搜索lxml,下载Python对应的lxml版本.如下图: 2.打开cmd,进入到lxm ...
- pip install psycopg2出现python setup.py egg_info failed with error code 1 in /tmp/pip-build-YtLeN3/psycopg2错误处理
折腾了一上午flask部署,到最后访问域名还是出现Application Error错误提示.估计是程序还有问题,想着直接clone书中作者的代码先试试能不能部署成功.结果在执行pip install ...
- 查看pip install安装的python包的位置
例如,我在一个名为tf_14的vertualenv环境中(no-site-package)安装了一个contextlib2包 (tf_14) novak@novak-ZBook15G2:~/Carnd ...
- pip安装lxml报错 Fatal error in launcher: Unable to create process using '"c:\users\administrator\appdata\local\programs\python\python36\python.exe" "C:\Users\Administrator\AppData\L
pip install lxml 安装报错 E:\apollo\spider_code>Fatal error in launcher: Unable to create process usi ...
- python pip install 报错TypeError: unsupported operand type(s) for -=: 'Retry' and 'int' Command "python setup.py egg_info" failed with error code 1 in
pip install http://download.pytorch.org/whl/cu80/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl ...
- Windows环境下使用pip install安装lxml库
lxml是Python语言和XML以及HTML工作的功能最丰富和最容易使用的库.lxml是为libxml2和libxslt库的一个Python化的绑定.它与众不同的地方是它兼顾了这些库的速度和功能完整 ...
- python pip安装lxml失败(转)
今天想要试试beautifulsoup4,安装的时候很顺利,然后就准备安装lxml作为解析器,没想到安装时pip直接给我报了一整页的错误. 解决过程 查看了一下错误提示,其中有如下一段: ****** ...
随机推荐
- Abschlussarbeit:Konstruktion und Implementierung von Dota2 Datenbank Intelligent Verwaltungsplatfom
1.Die Hintergrund und Bedeutung des Themas Dank nicht ausreichendes Erkenntnisse der Spielplanner un ...
- Eclipse空白包的显示和隐藏
Eclipse空白包的显示和隐藏 点击三角形, ,下拉 -> Customize View... -> Empty packages (勾选)
- 带你走近WebSocket协议
一.WebSocket协议是什么? WebSocket 是 HTML5 开始提供的一种在单个 TCP 连接上进行全双工通讯的协议. 二.那为什么我们要用WebSocket协议呢? 了解计算机网络协议的 ...
- php常用的时间函数
测试环境:php5.3.29 unix时间戳(从Unix 纪元(January 1 1970 00:00:00 GMT)到给定时间的秒数.).以下简称时间戳. 设置默认时区 date_default_ ...
- php中continue关键字
跳出本次循环进行下一次. 在while和do while中也可以用 $num = 0; while($num < 10) { $num ++; if($num === 5) { echo 'eq ...
- jQuery几个易混淆之处(参考《众妙之门》及相关博客)
parent() && parents() && closest() 这三个方法都与沿着DOM向上导航有关,在由选择器返回的元素上方,匹配父元素或之前的祖先元素,但是每 ...
- 最短路问题(floyd算法)(优化待续)
问题描述: 最短路问题(short-path problem):若网络中的每条边都有一个数值(长度.成本.时间等),则找出两节点(通常是源节点和阱节点)之间总权和最小的路径就是最短路问题.最短路问题是 ...
- python学习之老男孩python全栈第九期_day018知识点总结——正则表达式、re模块
一. 正则表达式 正则表达式本身和python没有什么关系,就是匹配字符串内容的一种规则. 官方定义:正则表达式是对字符串操作的一种逻辑公式,就是用事先定义好的一些特定字符.及这些特定字符的组合,组成 ...
- html5 转义实体字符 元数据 跳转 全局属性 id class lang style
实体 Html 实体就是把特殊字符通过代码显示出来, 比如, <>在浏览器会识别为标签,不能正常显示, 这是你就需要安如<去表达左尖括号. 元数据 2. 声明字符编码 3.模 ...
- react生命周期es6
基本函数有 import React from 'react' export default class MyClass extends React.Component { constructor(p ...