安装uwsgi时报错


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

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

这几个步骤我之前就做了
然后,我就安装uwsgi,


 pip install uwsgi

安装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

python uwsgi

西行寺奈奈子 10 years, 2 months ago

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

邪恶D小狼 answered 10 years, 2 months ago

Your Answer