热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

djangomysqlpython_Django:Mysqlpython安装

当尝试为Django安装requirements.txt时,在尝试安装Mysqlpython时出现以下错误Traceback(mostrecentcalllast):

当尝试为Django安装requirements.txt时,在尝试安装Mysql python时出现以下错误Traceback (most recent call last):

File "", line 17, in

File "/home/abercrrl/.virtualenvs/django_at/build/MySQL-python/setup.py", line 7, in

use_setuptools()

File "distribute_setup.py", line 145, in use_setuptools

return _do_download(version, download_base, to_dir, download_delay)

File "distribute_setup.py", line 125, in _do_download

_build_egg(egg, tarball, to_dir)

File "distribute_setup.py", line 116, in _build_egg

raise IOError('Could not build the egg.')

IOError: Could not build the egg.

----------------------------------------

Cleaning up...

Command python setup.py egg_info failed with error code 1 in /home/abercrrl/.virtualenvs/django_at/build/MySQL-python

Storing debug log for failure in /home/abercrrl/.pip/pip.log

注意,我试过:pip install --upgrade setuptools

Setuptools已经是最新的

编辑:

我修改了以下命令以匹配我的位置:echo "mysql_config = /usr/bin/mysql_config" >> ~/.virtualenvs/django_at/build/MySQL-python/site.cfg

我确实需要创建build和MySQL python目录才能运行。命令运行得很好,但是现在我明白了:

https://gist.github.com/rlabercrombie/8725074



推荐阅读
author-avatar
jiangzh
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有