本文介绍了uWSGI,导入错误:在Ubuntu上没有模块命名的网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想按照教程在的http:// uwsgi -docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html 。我已经得到了一切工作下来tohttp://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html#install-uwsgi-system-wide.我正与在Amazon EC2上使用Ubuntu 14.4实例:

I'm trying to follow the tutorial at http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html. I've gotten everything working down tohttp://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html#install-uwsgi-system-wide. I am working with an ubuntu 14.4 instance on amazon EC2:

没有进入我的virtualenv,我跑:

Without going into my virtualenv , I ran:

sudo pip install uwsgi 

这导致了

     ############## end of uWSGI configuration #############
     total build time: 24 seconds
     *** uWSGI is ready, launch it with /usr/local/bin/uwsgi ***     

 Successfully installed uwsgi
 Cleaning up...

然后我跑了:

Then I ran:

 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

从快到了,我该怎么解决这个问题?

coming from and how can I fix this?

推荐答案

尝试无现场= TRUE 在mysite_uwsgi.ini文件。

Try no-site = True in mysite_uwsgi.ini file.

这篇关于uWSGI,导入错误:在Ubuntu上没有模块命名的网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 19:31