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. jmeter-集合点---学习笔记

    集合点: 简单来理解一下,虽然我们的“性能测试”理解为“多用户并发测试”,但真正的并发是不存在的,为了更真实的实现并发这感念,我们可以在需要压力的地方设置集合点,每到输入用户名和密码登录时,所有的虚拟 ...

  2. Android官方架构组件介绍之LiveData(二)

    LiveData LiveData是一个用于持有数据并支持数据可被监听(观察).和传统的观察者模式中的被观察者不一样,LiveData是一个生命周期感知组件,因此观察者可以指定某一个LifeCycle ...

  3. 不要滥用SharedPreference

    SharedPreference是Android上一种非常易用的轻量级存储方式,由于其API及其友好,得到了很多很多开发者的青睐.但是,SharedPreference并不是万能的,如果把它用在不合适 ...

  4. ErlangC 最佳人力效益指标

    以平均服务时间(AHT)180秒,顾客来电量每15分钟150通以及服务目标时间在20秒内为例子说明最佳人力效益指标.此假设条件下由Erlang C模拟器的结果如下图, 假设我希望客服中心的期望服务水准 ...

  5. 使用CSS选择器进行元素定位

    在selenium webdriver中,支持使用CSS选择器来进行元素定位,事实在真的投入工作,大量编辑用例和元素定位的时候,使用css 和 xpath才是经常需要用到的. 之前有专门讲过使用xpa ...

  6. 关于Mysql数据库的注意点

    1.注意属性为String的数据在JDBC操作语句中要加单引号 例子: conn = DriverManager.getConnection("jdbc:mysql://localhost: ...

  7. shell脚本的使用

    $#  返回命令行参数个数 $n  接受终端指定位置参数 $*  接受终端所有参数(不包含 $0) $@  接受终端所有参数(不包含 $0,在for循环时和 $* 的表现有差异) $?  返回上一次程 ...

  8. Maven常用插件整理

    maven内置变量 ${basedir}表示项目根目录,即包含pom.xml文件的目录; ${version}表示项目版本; ${project.basedir}同${basedir}; ${proj ...

  9. Net-SNMP(V3协议)安装配置笔记(CentOS 5.2)(转)

    原出处:http://blog.ihipop.info/2010/03/722.html 为了这颗仙人掌(cacti),我必须先部署(Net-SNMP), 同时我为了安全因素,也为了简便考虑,决定采用 ...

  10. maven课程 项目管理利器-maven 3-3 maven中的坐标和仓库

    本节主要讲了两大方面: 1 maven坐标 1.0  构件定义 任何依赖,插件,项目构建输出 都称之为构件. 1.1 maven坐标概念 groupid 公司或组织的域名倒序+当前项目名称 artif ...