环境:CentOS6.4,python2.6我创建了一个virtualenv(envflask)并激活它,然后pip安装烧瓶,一切都还可以!但是在创建了另一个virtualenv(envuwsgi)并激活它后,我没有pip install uwsgi,错误消息是:
...
plugins/python/python_plugin.c:1731: ?????????‘<erroneous-expression>’??????
plugins/python/python_plugin.c:1731: ?????????
plugins/python/python_plugin.c: ???‘uwsgi_python_harakiri’?:
plugins/python/python_plugin.c:1737: ???‘struct uwsgi_python’????‘tracebacker’???
plugins/python/python_plugin.c:1740: ???‘struct uwsgi_python’????‘tracebacker’???
plugins/python/python_plugin.c:1740: ?????‘uwsgi_concat2’?? 1 ????????????????
plugins/python/../../uwsgi.h:2733: ???????‘char *’????????‘struct uwsgi_option *’
plugins/python/python_plugin.c: ???‘uwsgi_python_logger’?:
plugins/python/python_plugin.c:1768: ???‘struct uwsgi_python’????‘gil_get’???
plugins/python/python_plugin.c:1768: ?????????‘<erroneous-expression>’??????
plugins/python/python_plugin.c:1768: ?????????
plugins/python/python_plugin.c:1771: ???‘PyObject’???(??????????)
plugins/python/python_plugin.c:1771: ???‘py_logging’???(??????????)
plugins/python/python_plugin.c:1771: ???????? * ???(‘struct uwsgi_option *’?‘struct uwsgi_option *’)??
plugins/python/python_plugin.c:1771: ?????????
plugins/python/python_plugin.c:1773: ???‘py_logging_dict’???(??????????)
plugins/python/python_plugin.c:1773: ???????? * ???(‘struct uwsgi_option *’?‘struct uwsgi_option *’)??
plugins/python/python_plugin.c:1773: ?????????
plugins/python/python_plugin.c:1775: ???‘py_getLogger’???(??????????)
plugins/python/python_plugin.c:1775: ???????? * ???(‘struct uwsgi_option *’?‘struct uwsgi_option *’)??
plugins/python/python_plugin.c:1775: ?????????
plugins/python/python_plugin.c:1777: ???‘py_getLogger_args’???(??????????)
plugins/python/python_plugin.c:1777: ???????? * ???(‘struct uwsgi_option *’?‘struct uwsgi_option *’)??
plugins/python/python_plugin.c:1777: ?????????
plugins/python/python_plugin.c:1779: ?????????
plugins/python/python_plugin.c:1791: ?????????‘PyObject_CallMethod’
plugins/python/python_plugin.c:1791: ???expected expression before ‘)’ token
plugins/python/python_plugin.c:1791: ???????? * ???(‘struct uwsgi_option *’?‘struct uwsgi_option *’)??
plugins/python/python_plugin.c:1795: ???‘struct uwsgi_python’????‘gil_release’???
plugins/python/python_plugin.c:1795: ?????????‘<erroneous-expression>’??????
plugins/python/python_plugin.c:1795: ?????????
plugins/python/python_plugin.c:1799: ???‘struct uwsgi_python’????‘gil_release’???
plugins/python/python_plugin.c:1799: ?????????‘<erroneous-expression>’??????
plugins/python/python_plugin.c:1799: ?????????
----------------------------------------
Command /home/Alex/myproject/envuwsgi/bin/python -c "import setuptools;__file__='/home/Alex/myproject/envuwsgi/build/uwsgi/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-o9rNHV-record/install-record.txt --single-version-externally-managed --install-headers /home/Alex/myproject/envuwsgi/include/site/python2.6 failed with error code 1 in /home/Alex/myproject/envuwsgi/build/uwsgi
Storing complete log in /home/Alex/.pip/pip.log
(envuwsgi)[Alex@Alex myproject]$
Run Code Online (Sandbox Code Playgroud)
谢谢!
你需要为你的python安装头文件,所以uwsgi python插件可以使用像"PyObject"这样的东西.
试试这个:
yum install python-devel
Run Code Online (Sandbox Code Playgroud)