首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在virtualenv中pip安装uwsgi失败

在virtualenv中pip安装uwsgi失败
EN

Stack Overflow用户
提问于 2013-06-06 09:00:51
回答 1查看 2.7K关注 0票数 1

环境: CentOS6.4,python2.6我创建了一个virtualenv (envflask)并激活它,然后pip安装flask,一切正常!但是在创建了另一个virtualenv (envuwsgi)并激活它之后,我通过pip安装uwsgi失败了,错误消息是:

代码语言:javascript
复制
...
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]$ 

谢谢!

EN

回答 1

Stack Overflow用户

发布于 2013-06-15 11:31:10

您需要python安装的头文件,所以uwsgi python插件可以使用类似于"PyObject“的内容。

试试这个:

代码语言:javascript
复制
yum install python-devel
票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16952166

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档