2014-12-11 3 views
0

내 컴퓨터에서 uwsgi를 실행할 수없는 문제가 있습니다. 나는이가 계속 :Python3 uWSGI가 즉시 중지됩니다.

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

/usr/bin$ sudo service ppuwsgi status 
>>ppuwsgi stop/waiting 

내가이 사람 here와 유사한 문제가 발생 될 수있다 생각합니다. 그러나 소스에서 설치하지 않았습니다. 나는 기계가 파이썬과 함께 온 것을 보았다. 그러나 나는 어쩌면

sudo apt-get install libpq-dev python3-dev 

와 내가 파이썬 두 번 설치하지 않은 생각하고 싶지도

sudo apt-get install python-dev 

을했다. 그리고 어떻게 확인하고 볼지 전혀 모르겠습니다. 내 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 

양말 파일과 로그 파일 (로그 파일이 비어)뿐만 아니라 생성받을 것으로 보인다. 나는 그 거래가 무엇인지 모른다.

편집 :

그래서 내가 사용자/빈을 열어/여기에 내가 가진 모든 파이썬 것들입니다.

a bunch of Python stuff

편집 : 나는 오류 로그에 물건을 얻고있다

거짓말. 나는 내가 sudo없이 정력을 열었 기 때문에 그것을 볼 수 없었다. 다음은 오류 로그입니다.

*** 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 
+0

다른 파이썬 버전에 관해서 ... 쉘에서 단순히'python --version'을 실행하면 어떻게 될까요? 시스템이 디폴트로 사용중인 버전을 알려줍니다. 다음으로'/ usr/bin/... '아래에 다른 파이썬 버전이 있는지 찾아야합니다. – Timusan

+0

내가 python --version을 할 때 나는 python2.7.6을 얻는다. 그러나 python3.4.0을 제공하는 python3 --version도 가지고있다. 어느 쪽이 디폴트가 될까요? –

답변

-1

오류 로그를 기반으로합니다. 파이썬 버전을 바꿨습니다. uwsgi와 pip를 제거한 다음 python3 pip를 사용하여 다시 설치했습니다.

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

그런 다음 uwsgi를 실행할 수있었습니다.

+0

해결해야 할 오류는 무엇입니까? – surfer190

+0

다른 오류는 질문과 관련이 없습니다. 그냥 파이썬 오류. –