鍍金池/ 問答/Python  Linux  網(wǎng)絡安全/ ubuntu測試uwsgi報錯

ubuntu測試uwsgi報錯

想在ubuntu上搭建一個django的服務器。然后根據(jù)網(wǎng)上的教程安裝了uwsgi,安裝完之后運行一個測試的文件,test.py,然后報錯。
報錯內(nèi)容:
dh@ubuntu:~$ uwsgi --http :8001 --wsgi-file test.py
Starting uWSGI 2.0.17 (64bit) on [Mon Jun 11 12:37:29 2018]
compiled with version: 7.3.0 on 07 June 2018 06:45:48
os: Linux-4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018
nodename: ubuntu
machine: x86_64
clock source: unix
detected number of CPU cores: 4
current working directory: /home/dh
detected binary path: /home/dh/.local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
WARNING: you are running uWSGI without its master process manager
your processes number limit is 15072
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 http bound on :8001 fd 4
spawned uWSGI http 1 (pid: 18207)
uwsgi socket 0 bound to TCP address 127.0.0.1:36073 (port auto-assigned) fd 3
Python version: 3.6.5 (default, Apr 1 2018, 05:46:30) [GCC 7.3.0]
Python threads support is disabled. You can enable it with --enable-threads
Python main interpreter initialized at 0x55e5bf3e29c0
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72904 bytes (71 KB) for 1 cores
Operational MODE: single process
failed to open python file test.py
unable to load app 0 (mountpoint='') (callable not found or import error)
no app loaded. going in full dynamic mode
uWSGI is running in multiple interpreter mode
spawned uWSGI worker 1 (and the only) (pid: 18206, cores: 1)
求幫助?。。。。。。。。。。。?!

回答
編輯回答
魚梓

此題已經(jīng)解決,解決方法很簡單,在運行測試命令: uwsgi --http :8001 --wsgi-file test.py時,終端的位置必須要和test.py文件位置相同,才能正常運行起來。

2017年3月9日 14:02