PIP下的virtualenv安装mysql == 1.2.3(Django部署到亚马逊弹性魔豆) [英] pip install mysql==1.2.3 under virtualenv (Deploy Django to Amazon Elastic Beanstalk)

查看:171
本文介绍了PIP下的virtualenv安装mysql == 1.2.3(Django部署到亚马逊弹性魔豆)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想Django部署到亚马逊弹性魔豆在Mac上特立独行,根据 官方教程

I am trying to deploy Django to Amazon Elastic Beanstalk on mac Maverick, according to the official tutorial

在我激活的virtualenv和PIP安装mysql == 1.2.3,出现以下错误:

After I activated a virtualenv and pip install mysql==1.2.3, the following error appears:

(djangodev)Lee-Jamess-MacBook-Pro:~ h0925473$ pip install mysql-python==1.2.3
Downloading/unpacking mysql-python==1.2.3
  Downloading MySQL-python-1.2.3.tar.gz (70kB): 70kB downloaded
  Running setup.py (path:/private/tmp/djangodev/build/mysql-python/setup.py) egg_info for package mysql-python
    warning: no files found matching 'MANIFEST'
    warning: no files found matching 'ChangeLog'
    warning: no files found matching 'GPL'
Installing collected packages: mysql-python
  Running setup.py install for mysql-python
    building '_mysql' extension
    cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch x86_64 -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/Cellar/mysql/5.6.17_1/include/mysql -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _mysql.c -o build/temp.macosx-10.9-x86_64-2.6/_mysql.o -Os -g -fno-strict-aliasing
    clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
    clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
    error: command 'cc' failed with exit status 1
    Complete output from command /tmp/djangodev/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/djangodev/build/mysql-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/5_/vv2pw8nd0d53pjdqnrny5l080000gn/T/pip-yeU00T-record/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/djangodev/include/site/python2.6:
    running install

running build

running build_py

creating build

creating build/lib.macosx-10.9-x86_64-2.6

copying _mysql_exceptions.py -> build/lib.macosx-10.9-x86_64-2.6

creating build/lib.macosx-10.9-x86_64-2.6/MySQLdb

copying MySQLdb/__init__.py -> build/lib.macosx-10.9-x86_64-2.6/MySQLdb

copying MySQLdb/converters.py -> build/lib.macosx-10.9-x86_64-2.6/MySQLdb

copying MySQLdb/connections.py -> build/lib.macosx-10.9-x86_64-2.6/MySQLdb

copying MySQLdb/cursors.py -> build/lib.macosx-10.9-x86_64-2.6/MySQLdb

copying MySQLdb/release.py -> build/lib.macosx-10.9-x86_64-2.6/MySQLdb

copying MySQLdb/times.py -> build/lib.macosx-10.9-x86_64-2.6/MySQLdb

creating build/lib.macosx-10.9-x86_64-2.6/MySQLdb/constants

copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.9-x86_64-2.6/MySQLdb/constants

copying MySQLdb/constants/CR.py -> build/lib.macosx-10.9-x86_64-2.6/MySQLdb/constants

copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.9-x86_64-2.6/MySQLdb/constants

copying MySQLdb/constants/ER.py -> build/lib.macosx-10.9-x86_64-2.6/MySQLdb/constants

copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.9-x86_64-2.6/MySQLdb/constants

copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.9-x86_64-2.6/MySQLdb/constants

copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-x86_64-2.6/MySQLdb/constants

running build_ext

building '_mysql' extension

creating build/temp.macosx-10.9-x86_64-2.6

cc -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -arch x86_64 -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/Cellar/mysql/5.6.17_1/include/mysql -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _mysql.c -o build/temp.macosx-10.9-x86_64-2.6/_mysql.o -Os -g -fno-strict-aliasing

clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

clang: note: this will be a hard error (cannot be downgraded to a warning) in the future

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /tmp/djangodev/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/djangodev/build/mysql python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/5_/vv2pw8nd0d53pjdqnrny5l080000gn/T/pip-yeU00T-record/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/djangodev/include/site/python2.6 failed with error code 1 in /private/tmp/djangodev/build/mysql-python
Storing debug log for failure in /Users/h0925473/.pip/pip.log

当我进一步startproject命令使用Django和 PIP冻结> requirements.txt : 本教程中提到requirements.txt应包含以下内容:

When I further startproject with Django and pip freeze > requirements.txt: the tutorial mentioned that the requirements.txt should contain:

Django==1.4.1
MySQL-python==1.2.3

但我requirements.txt仅为:

but my requirements.txt is only:

Django==1.4.1
wsgiref==0.1.2

这是否意味着我安装的MySQL已经失败了?如果是这样,我怎么能修复吗?

Does this mean my installation of MySql has failed? If so, how can i fixed it?

推荐答案

这个

尝试

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install mysql-python==1.2.3

这篇关于PIP下的virtualenv安装mysql == 1.2.3(Django部署到亚马逊弹性魔豆)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆