Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/321.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 我在virtualenv安装中遇到的异常错误_Python_Virtualenv_Osx Mavericks_Homebrew_Gevent - Fatal编程技术网

Python 我在virtualenv安装中遇到的异常错误

Python 我在virtualenv安装中遇到的异常错误,python,virtualenv,osx-mavericks,homebrew,gevent,Python,Virtualenv,Osx Mavericks,Homebrew,Gevent,当我使用pip安装-r requirement.txtcommmand时,我尝试在一个新的virtualenv目录中安装一些需求库。我得到了这个错误: Requirement already satisfied (use --upgrade to upgrade): wsgiref==0.1.2 in /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 (from -r requirement.txt (l

当我使用
pip安装-r requirement.txt
commmand时,我尝试在一个新的virtualenv目录中安装一些需求库。我得到了这个错误:

Requirement already satisfied (use --upgrade to upgrade): wsgiref==0.1.2 in /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 (from -r requirement.txt (line 19))
Installing collected packages: greenlet, grequests, killproc, kombu, mccabe, pep8, psutil, pyflakes, pytz, redis, requests
  Running setup.py install for greenlet
    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 -fno-tree-dominator-opts -arch x86_64 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c /var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T/tmpXfAIrt/simple.c -o /var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T/tmpXfAIrt/var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T/tmpXfAIrt/simple.o
    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
    clang: error: unknown argument: '-fno-tree-dominator-opts' [-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
    building 'greenlet' 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 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c greenlet.c -o build/temp.macosx-10.9-intel-2.7/greenlet.o
    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 /Users/penkzhou/.virtualenvs/JOB_ENV/bin/python -c "import setuptools, tokenize;__file__='/Users/penkzhou/.virtualenvs/JOB_ENV/build/greenlet/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T/pip-FNK0mO-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/penkzhou/.virtualenvs/JOB_ENV/include/site/python2.7:
    running install

running build

running build_ext

creating /var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T/tmpXfAIrt/var

creating /var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T/tmpXfAIrt/var/folders

creating /var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T/tmpXfAIrt/var/folders/5h

creating /var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T/tmpXfAIrt/var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn

creating /var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T/tmpXfAIrt/var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T

creating /var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T/tmpXfAIrt/var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T/tmpXfAIrt

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 -fno-tree-dominator-opts -arch x86_64 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c /var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T/tmpXfAIrt/simple.c -o /var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T/tmpXfAIrt/var/folders/5h/63q1xmj961b7hv9y0ntdt7gc0000gn/T/tmpXfAIrt/simple.o

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

clang: error: unknown argument: '-fno-tree-dominator-opts' [-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

building 'greenlet' extension

creating build

creating build/temp.macosx-10.9-intel-2.7

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 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c greenlet.c -o build/temp.macosx-10.9-intel-2.7/greenlet.o

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
我已经安装了
brew
,Python环境就是这样安装的。另一个信息是,我已经在一个旧的mac帐户上安装了一些带有mac的原始Python环境的Python库。然后我想从头开始,切换到一个新的mac帐户。然后,我在virtualenv中安装了一些库时出现了上述错误环境我在谷歌上搜索了
-mno-fused-madd
,但我一无所获。那么有人知道这件事吗?谢谢。

好的。我找到了解决办法。可能我在安装
gevent
时丢失了一些细节。所以我需要先安装libevent:

brew install libevent
然后我必须设置此标志,以便gevent可以构建:

export CFLAGS=-I/opt/local/include
之后,我可以在virtualenv中成功安装
gevent
。希望这对你们有帮助