uWSGI,ImportError:Ubuntu上没有名为site的模块

2024-04-29 10:42:43 发布

您现在位置:Python中文网/ 问答频道 /正文

enter image description here

我试着跟随http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html上的教程。我已经把一切都搞定了http://uwsgi docs.readthedocs.org/en/latest/tutorials/Django_和_nginx.html安装-uwsgi系统范围。我正在使用amazon EC2上的Ubuntu14.4实例:

没有进入我的虚拟现实,我跑了:

sudo pip install uwsgi 

这导致

^{pr2}$

然后我跑了:

 ubuntu@ip-172-31-28-196:~$ uwsgi --ini /home/ubuntu/tproxy/tp/mysite_uwsgi.ini
 [uWSGI] getting INI configuration from /home/ubuntu/tproxy/tp/mysite_uwsgi.ini
 *** Starting uWSGI 2.0.9 (64bit) on [Fri Mar  6 16:15:07 2015] ***
 compiled with version: 4.8.2 on 06 March 2015 16:10:06
 os: Linux-3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014
 nodename: ip-172-31-28-196
 machine: x86_64
 clock source: unix
 detected number of CPU cores: 1
 current working directory: /home/ubuntu
 detected binary path: /usr/local/bin/uwsgi
 !!! no internal routing support, rebuild with pcre support !!!
 chdir() to /home/ubuntu/tproxy/tp
 your processes number limit is 7862
 your memory page size is 4096 bytes
 detected max file descriptor number: 1024
 lock engine: pthread robust mutexes
 thunder lock: disabled (you can enable it with --thunder-lock)
 uwsgi socket 0 bound to UNIX address /tmp/mysite.sock fd 3
 Python version: 2.7.6 (default, Mar 22 2014, 23:03:41)  [GCC 4.8.2]
 Set PythonHome to /home/ubuntu/.virtualenvs/env1
 ImportError: No module named site
 VACUUM: unix socket /tmp/mysite.sock removed.

在哪里

ImportError: No module named site on Ubuntu

我怎么才能解决这个问题?在


Tags: tolockhttpdocsnumberhomeonubuntu