惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 聂微东
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
Recent Announcements
Recent Announcements
大猫的无限游戏
大猫的无限游戏
MongoDB | Blog
MongoDB | Blog
A
About on SuperTechFans
M
MIT News - Artificial intelligence
V
Visual Studio Blog
云风的 BLOG
云风的 BLOG
The GitHub Blog
The GitHub Blog
Jina AI
Jina AI
P
Proofpoint News Feed
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
宝玉的分享
宝玉的分享
Engineering at Meta
Engineering at Meta
Last Week in AI
Last Week in AI
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
N
Netflix TechBlog - Medium
人人都是产品经理
人人都是产品经理

博客园 - kylinfish

sentry 9.1.1docker版onepremise过程记录 python内置函数all使用的坑 centos7.2自带的php5.4升级为5.6 ubuntu14.04 编译安装gcc-5.3.0 ubuntu14.04编译安装Git2.7 ubuntu启动器和dash里应用图标不正常 ubuntu14.04使用IceGridAdmin图形界面 在线手册收藏 VIM配置相关记录 virtualbox 错误解决记录 Docker资源收录 mysql workbench的PK,NN,UQ,BIN,UN,ZF,AI GIT非常见命令使用笔记 Google的Python代码格式化工具YAPF详解 在ubuntu上使用QQ的经历 Ubuntu 14.04 下安装Skype 情人节的宠物-测试小工具 API接口数据自检 环信REST API python SDK
pip install lxml mysql-python error
kylinfish · 2015-03-18 · via 博客园 - kylinfish

问题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