【问题标题】:the unusual error I meet in the virtualenv install我在 virtualenv 安装中遇到的异常错误
【发布时间】:2014-05-11 04:45:26
【问题描述】:

当我使用pip install -r requirement.txt 命令时,我尝试在新的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环境是由这个instruction安装的。另一个信息是我已经在一个旧的mac帐户上安装了一些带有mac的原始python环境的python lib。然后我想从头开始并切换到一个新的mac帐户。然后我在virtualenv环境中安装一些lib时出现上述错误。我谷歌-mno-fused-madd但我什么也没得到。所以有人知道吗?谢谢。

【问题讨论】:

    标签: python virtualenv osx-mavericks homebrew gevent


    【解决方案1】:

    好的。我找到了解决方案here。也许我在安装gevent时会丢失一些细节。所以我需要先安装libevent:

    brew install libevent
    

    然后我必须设置这个标志,以便 gevent 可以构建:

    export CFLAGS=-I/opt/local/include
    

    之后,我可以在 virtualenv 中成功安装gevent。希望对大家有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-12-05
      • 2022-12-18
      • 2015-07-20
      • 2017-03-23
      • 2019-03-01
      • 2016-11-11
      • 1970-01-01
      相关资源
      最近更新 更多