gpt4 book ai didi

python - 无法在 Mac OS X 10.9.5 上安装 uWSGI

转载 作者:太空狗 更新时间:2023-10-30 01:48:43 25 4
gpt4 key购买 nike

当我尝试在 Mac OS X 10.9.5 中安装 uWSGI 时,出现以下错误:

Installing collected packages: uwsgi
Running setup.py install for uwsgi
plugins/python/pyutils.c:14:22: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
if (((exc)->ob_type == &PyClass_Type)) {
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
plugins/python/pyutils.c:14:22: note: remove extraneous parentheses around the comparison to silence this warning
if (((exc)->ob_type == &PyClass_Type)) {
~ ^ ~
plugins/python/pyutils.c:14:22: note: use '=' to turn this equality comparison into an assignment
if (((exc)->ob_type == &PyClass_Type)) {
^~
=
1 error generated.
Complete output from command /Users/jakob/.virtualenvs/uwsgi/bin/python -c "import setuptools, tokenize;__file__='/Users/jakob/.virtualenvs/uwsgi/build/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/sk/51hn9dcn0b9g6mggg4wkmb6w0000gp/T/pip-p4efMm-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/jakob/.virtualenvs/uwsgi/include/site/python2.7:

我在 virtualenv 中运行,使用 Python 2.7.5,尝试升级 pyutils。有什么想法吗?

这是完整的日志:

~/t/uwsgi $ vf new uwsgi                                                                                                                                                 
New python executable in /Users/jakob/.virtualenvs/uwsgi/bin/python
Installing setuptools, pip...done.
(uwsgi) ~/t/uwsgi $ python --version
Python 2.7.5
(uwsgi) ~/t/uwsgi $ pip install uwsgi
Downloading/unpacking uwsgi
Real name of requirement uwsgi is uWSGI
Using download cache from /Users/jakob/.pip/cache/pypi%2Fpackages%2Fsource%2Fu%2FuWSGI%2Fuwsgi-2.0.7.tar.gz
Running setup.py (path:/Users/jakob/.virtualenvs/uwsgi/build/uwsgi/setup.py) egg_info for package uwsgi

Installing collected packages: uwsgi
Running setup.py install for uwsgi
plugins/python/pyutils.c:14:22: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
if (((exc)->ob_type == &PyClass_Type)) {
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
plugins/python/pyutils.c:14:22: note: remove extraneous parentheses around the comparison to silence this warning
if (((exc)->ob_type == &PyClass_Type)) {
~ ^ ~
plugins/python/pyutils.c:14:22: note: use '=' to turn this equality comparison into an assignment
if (((exc)->ob_type == &PyClass_Type)) {
^~
=
1 error generated.
Complete output from command /Users/jakob/.virtualenvs/uwsgi/bin/python -c "import setuptools, tokenize;__file__='/Users/jakob/.virtualenvs/uwsgi/build/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/sk/51hn9dcn0b9g6mggg4wkmb6w0000gp/T/pip-p4efMm-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/jakob/.virtualenvs/uwsgi/include/site/python2.7:
running install

plugins/python/pyutils.c:14:22: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]

if (((exc)->ob_type == &PyClass_Type)) {

~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~

plugins/python/pyutils.c:14:22: note: remove extraneous parentheses around the comparison to silence this warning

if (((exc)->ob_type == &PyClass_Type)) {

~ ^ ~

plugins/python/pyutils.c:14:22: note: use '=' to turn this equality comparison into an assignment

if (((exc)->ob_type == &PyClass_Type)) {

^~

=

1 error generated.

----------------------------------------
Cleaning up...
Command /Users/jakob/.virtualenvs/uwsgi/bin/python -c "import setuptools, tokenize;__file__='/Users/jakob/.virtualenvs/uwsgi/build/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/sk/51hn9dcn0b9g6mggg4wkmb6w0000gp/T/pip-p4efMm-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/jakob/.virtualenvs/uwsgi/include/site/python2.7 failed with error code 1 in /Users/jakob/.virtualenvs/uwsgi/build/uwsgi
Storing debug log for failure in /Users/jakob/.pip/pip.log

(uwsgi) ~/t/uwsgi $ pip freeze
wsgiref==0.1.2

最佳答案

使用 export CC=/usr/bin/llvm-gcc 使其工作。

关于python - 无法在 Mac OS X 10.9.5 上安装 uWSGI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26386408/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com