Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-9enuqi/MySQL-python/
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/的更多相关文章
- 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 ...
- 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 ...
- 解决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 ...
- 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 ...
- 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
- 转: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 ...
- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build*解决办法
easy_install -U setuptools or pip install ipython 亲测有效
- 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
- 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 ...
随机推荐
- HBuilder的常用快捷键
Ctrl + d 删除整行内容 Ctrl + Shift +R 复制当前行到下一行 Ctrl + Shift +D 重新编辑 Ctrl + 方向键 当前行整行内容上移或下移 Alt + ↓ 跳转到下一 ...
- jenkins自动打IOS包(转发)
投稿文章,作者:一缕殇流化隐半边冰霜(@halfrost) 前言 众所周知,现在App的竞争已经到了用户体验为王,质量为上的白热化阶段.用户们都是很挑剔的.如果一个公司的推广团队好不容易砸了重金推广了 ...
- 用javascript实现禁止页面后退返回上一页的代码
用javascript实现禁止页面后退返回上一页的代码: 有时候我们需要用户在点击了如下一步的按钮时,页面跳转到了下一个页面,这时想不允许用户返回后退到上一页,可以采用下面的方法: 在需要跳转的页 ...
- pat1040. Longest Symmetric String (25)
1040. Longest Symmetric String (25) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, ...
- 开发安全的 API 所需要核对的清单
开发安全的 API 所需要核对的清单 以下是当你在设计, 测试以及发布你的 API 的时候所需要核对的重要安全措施. 身份认证 不要使用 Basic Auth 使用标准的认证协议 (如 JWT, OA ...
- Navicat连接Oracle数据库报错ORA-28547解决方法
先说明下我机器的环境: 1.Win10 - 64bit 2.Navicat Premium_11.2.7 - 64bit 3.未安装Oracle数据库(包括Client也未安装) 解决方法: 1.下 ...
- EF删除数据
1.方法一,面向对象 using (MyDbContent content = new MyDbContent()) { content.Entry<UserInfo>(model).St ...
- dt4.0上传图片总是压缩解决办法,为什么我设置了不压缩图片,程序还是压缩呢?
即使后台设置也解决不了图片被压缩的厄运如图: 解决办法: 这个是上传控件名称和版本号 这个是文件的路径 在文档中找到 compress: 把windth和height后面的1600 改成更大的数值就可 ...
- Oracle 数据库 导入导出空表解决办法!
expdp导出:(打开CMD) 先创建(任意盘符):\oracle_data 文件夹 1.sqlplus / as sysdba;2.create or replace directory d_nam ...
- PHP+phpMyAdmin编程插入数据显示中文乱码的问题
相信初学php的同学应该都会试一些小程序,比如从input文本框输入数据后点击提交,数据自动插入数据库保存. 但是如果是输入中文提交,不经过一定配置,在phpMyAdmin中就会显示乱码.什么%ez. ...