python - 安装uwsgi时报错
ringa_lee
ringa_lee 2017-04-17 15:05:13
[Python讨论组]

接着上一个问题pip install python库报错,接着往下操作,问题也TM随之而来了。。。

CentOS 6.5
Python 2.6
pip 7.0.1
uwsgi 2.0.10
这里有个问题,安装uwsgi时,参照了官网 ,


然后,我就安装uwsgi,

pip install uwsgi

错误来了,是Failed building wheel for uwsgi,难道又是哪个库没装?求指导!

然而这个错误似乎并没有什么卵用,我执行命令

uwsgi prod.ini

prod.ini

[uwsgi]
http-socket = 0.0.0.0:8080
chdir = /root/yigo_runtime
env = DJANGO_SETTINGS_MODULE=yigo_runtime.settings
static-map = /static=/root/yigo_runtime/static
module = django.core.handlers.wsgi:WSGIHandler()
processes = 4
threads = 2
stats = 0.0.0.0:9090

并没有报错

[uWSGI] getting INI configuration from prod.ini
[uwsgi-static] added mapping for /static => /root/yigo_runtime/app/static
*** Starting uWSGI 2.0.10 (64bit) on [Thu May 28 23:50:17 2015] ***
compiled with version: 4.4.7 20120313 (Red Hat 4.4.7-11) on 28 May 2015 23:49:15
os: Linux-2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013
nodename: localhost.localdomain
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 16
current working directory: /root/yigo_runtime
detected binary path: /usr/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
chdir() to /root/yigo_runtime/app
chdir(): No such file or directory [core/uwsgi.c line 2556]
[root@localhost yigo_runtime]# vim prod.ini
[root@localhost yigo_runtime]# uwsgi prod.ini
[uWSGI] getting INI configuration from prod.ini
[uwsgi-static] added mapping for /static => /root/yigo_runtime/static
*** Starting uWSGI 2.0.10 (64bit) on [Thu May 28 23:51:22 2015] ***
compiled with version: 4.4.7 20120313 (Red Hat 4.4.7-11) on 28 May 2015 23:49:15
os: Linux-2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013
nodename: localhost.localdomain
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 16
current working directory: /root/yigo_runtime
detected binary path: /usr/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
chdir() to /root/yigo_runtime
your processes number limit is 272755
your memory page size is 4096 bytes
detected max file descriptor number: 1024
building mime-types dictionary from file /etc/mime.types...883 entry found
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 0.0.0.0:8080 fd 3
Python version: 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)  [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
Python main interpreter initialized at 0x21c6cf0
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 415360 bytes (405 KB) for 8 cores
*** Operational MODE: preforking+threaded ***
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x21c6cf0 pid: 81087 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 81087)
spawned uWSGI worker 1 (pid: 81110, cores: 2)
spawned uWSGI worker 2 (pid: 81111, cores: 2)
spawned uWSGI worker 3 (pid: 81113, cores: 2)
spawned uWSGI worker 4 (pid: 81114, cores: 2)
*** Stats server enabled on 0.0.0.0:9090 fd: 15 ***

nginx (我是到nginx官网看文档,写了个nginx.repo然后执行yum install nginx安装的,我也不知道什么版本,次奥)

求真心人 ,给我指点下迷津,为何会Failed building wheel for uwsgi

ringa_lee
ringa_lee

ringa_lee

全部回复(2)
伊谢尔伦

用 setuptools 不要用 distribute。自从某个版本之后 distribute 就容易出各种问题。

天蓬老师

编译安装uwsgi

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号