hu@hu-VirtualBox:/home/newdisk/telnet-scanner$ sudo pip install MySQL-python
[sudo] hu 的密码:
The directory '/home/hu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/hu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting MySQL-python
Downloading https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip (108kB)
100% |████████████████████████████████| 112kB 655kB/s
Complete output from command python setup.py egg_info:
sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-9enuqi/MySQL-python/setup.py", line 17, in <module>
metadata, options = get_config()
File "/tmp/pip-build-9enuqi/MySQL-python/setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "/tmp/pip-build-9enuqi/MySQL-python/setup_posix.py", line 25, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-9enuqi/MySQL-python/
You are using pip version 8.1.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

这个参考https://stackoverflow.com/questions/7475223/mysql-config-not-found-when-installing-mysqldb-python-interface

显示应该是没有装mysql,因为mysql-python是mysql的插件,因此需要安装mysql,就可以cover这个bug

执行如下操作:

sudo apt-get install mysql-server

sudo apt-get install libmysqlclient-dev

要装第二个是因为要相应的库才能正常使用mysql。

在重新执行安装命令

sudo pip install MySQL-python

显示成功。

注:上述环境是Ubuntu 16.04LTS版本,仅供参考。

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-9enuqi/MySQL-python/的更多相关文章

  1. pip安装mysql-python报错:Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-enRreC/mysql-python/

    公司业务开发,用python开发网站;需要使用模块MySQLdb. 我直接pip install MySQLdb,当然不成功了,模块名字因该是mysql-python pip install mysq ...

  2. python2 使用pip安装psycopg2出现错误:Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-mvzdNj/psycopg2/

    公司业务需求,开发语言python2,需要使用数据库:postgresql,需要安装模块psycopg2这个模块, 使用pip install psycopg2 报错: Command "p ...

  3. 解决Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-f8IeEI/MYSQL-python/

    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-f8IeEI/MYS ...

  4. pip安装报错Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-e_k8hq6a/pynacl/

    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-e_k8hq6a/pyn ...

  5. Ubuntu14.04安装MySQL-python异常: mysql_config: not found,Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-MJWMPd/MySQL-python/

    aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABUoAAAE8CAIAAACZ6RwMAAAgAElEQVR4nOydaVxTx9fHn9dhKWqltv

  6. 转:Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-j8m0mf5q/mysqlclient

    错误场景 第一次部署服务器时mysqlclient安装失败 思考 初步考虑是pip没有升级,最后发现不是这个原因. 解决办法 来源:https://blog.csdn.net/mr_tia/artic ...

  7. Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build*解决办法

    easy_install -U setuptools or pip install ipython 亲测有效

  8. Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-qvc66dfs/supervisor/

    # 安装supervisor 出错 pip3 install supervisor # 解决 sudo pip3 install supervisor

  9. 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 ...

随机推荐

  1. MQTT学习之一

    一MQTT特性: 基于C/S,发布订阅(发布者服务器->云平台代理->订阅客户端)一对多结构,适用于低带宽高延时,基于TCP/IP之上.

  2. python3+Appium自动化12-H5元素定位环境搭建

    前言 在混合开发的App中,经常会有内嵌的H5页面.那么这些H5页面元素该如何进行定位操作呢? 针对这种场景直接使用前面所讲的方法来进行定位是行不通的,因为前面的都是基于Andriod原生控件进行元素 ...

  3. Smaug Coverage

  4. script脚本中写不写$(document).ready(function() {});的区别

    $(document).ready() 里的代码是在页面内容都加载完才执行的,如果把代码直接写到script标签里,当页面加载完这个script标签就会执行里边的代码了,此时如果你标签里执行的代码调用 ...

  5. php表单提交时的身份证号码验证

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/ ...

  6. HBuilder更换部分

    1.HBuilder工作空间的更换 HBuilder的默认工作空间的修改并不像其他ide一样,在设置里进行更改,而是在工具中进行设置. 1.单击菜单栏“工具”,选择“变更默认代码存放目录” 2.进行修 ...

  7. (开发)bable - es6转码

    参考:http://www.ruanyifeng.com/blog/2016/01/babel.html Babel Babel是一个广泛使用的转码器,可以将ES6代码转为ES5代码,从而在现有环境执 ...

  8. 将Android工程打成jar包之后对资源的调用。

    Android工程不能完整的打包成jar包.这个主要是R文件导致的,但是我们可以将除了资源文件中的所有东西都打到jar包中.Activity.View等等类. 提供jar包的同时,还需要提供资源文件. ...

  9. Razor 语法糖常规用法

    1.隐匿代码表达式 例: @model.name 会将表达式的值计算并写入到响应中,输入时采用html编码方式 2.显示表达式 例:@(model.name)会将输入@model.name字符串 3. ...

  10. [SVN]TortoiseSVN工具培训5─常见问题解决

    1.文件提交时状态异常 产生原因:操作不当 解决方法:使用SVN的clean up命令 2.权限不足 产生原因:当前用户权限不足 解决方法:找配置管理员申请权限 3.网络故障 产生原因:无法访问到配置 ...