Django Python3 uWSGI立即停止

Django Python3 uWSGI立即停止,django,uwsgi,Django,Uwsgi,我遇到了一个问题,我无法让uwsgi在我的机器上运行。我一直在想: /usr/bin$ sudo service ppuwsgi start >>ppuwsgi start/running, process 17452 /usr/bin$ sudo service ppuwsgi status >>ppuwsgi stop/waiting 我想我可能和这家伙有类似的问题。但是,我没有从源代码安装。我看到这台机器配备了蟒蛇3.4。但我确实做到了 sudo apt-get

我遇到了一个问题,我无法让uwsgi在我的机器上运行。我一直在想:

/usr/bin$ sudo service ppuwsgi start
>>ppuwsgi start/running, process 17452

/usr/bin$ sudo service ppuwsgi status
>>ppuwsgi stop/waiting
我想我可能和这家伙有类似的问题。但是,我没有从源代码安装。我看到这台机器配备了蟒蛇3.4。但我确实做到了

sudo apt-get install libpq-dev python3-dev
甚至可能

sudo apt-get install python-dev
我想我没有安装两次python。我也不知道该怎么检查。我打开了我的
usr/local/bin
,看到了uwsgi和一些pip的东西,但没有看到python

最后,这里是我的
/etc/init/ppuwsgi.conf

# file: /etc/init/ppuwsgi.conf 
description "uWSGI server for PingPlot"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
exec /usr/local/bin/uwsgi --home /home/ubuntu/web/app/ --socket /home/ubuntu/web/ppuwsgi.sock --chmod-socket --module wsgi --pythonpath /home/ubuntu/web/ -H /home/ubuntu/.virtualenvs/pingplot --logto /home/ubuntu/web/logs/uwsgi.log
sock文件和日志文件似乎也已创建(日志文件为空)。我不知道交易是什么

编辑:

所以我打开了user/bin/这里是我所有的python工具

编辑:我撒谎了

我正在错误日志中获取内容。我就是看不到,因为我没有sudo就打开了vim。以下是错误日志:

*** Starting uWSGI 2.0.8 (64bit) on [Thu Dec 11 05:36:59 2014] ***
compiled with version: 4.8.2 on 09 December 2014 02:42:22
os: Linux-3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014
nodename: ip-172-31-9-208
machine: x86_64
clock source: unix
detected number of CPU cores: 1
current working directory: /
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 15925
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)
chmod() socket to 666 for lazy and brave users
uwsgi socket 0 bound to UNIX address /home/ubuntu/web/ppuwsgi.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/pennypledge
ImportError: No module named site

基于错误日志。我更改了Python的版本。我卸载了uwsgi和pip,然后用python3pip重新安装了它

sudo apt-get install python3-pip
sudo pip install uwsgi

然后我就可以运行uwsgi了。

关于不同的Python版本……在shell上运行
Python--version
会得到什么?它将告诉您系统使用的默认版本。接下来,您应该能够在
/usr/bin/…
下找到其他Python版本,如果有的话。当我使用Python时,我得到的是python2.7.6版本,但我也有python3版本,它提供了python3.4.0。uwsgi会默认哪个错误?其他错误与问题无关。只是python错误。