- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 nginx+django+uwsgi 来部署我的应用程序,但我发现它在我的主机上不起作用。错误是这样的:
[uWSGI] parsing config file forum/uwsgi.xml
*** Starting uWSGI 2.0.1 (64bit) on [Tue Feb 11 10:42:47 2014] ***
compiled with version: 4.7.3 on 11 February 2014 09:35:41
os: Linux-2.6.35-32-server #64 SMP Fri Jan 13 06:36:08 CST 2012
nodename: AY120826095xxxx
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /home/foo/git/project
detected binary path: /home/foo/git/software/uwsgi-2.0.1/uwsgi
*** WARNING: you are running uWSGI without its master process manager ***
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 TCP address 127.0.0.1:8630 fd 3
Python version: 2.7.4 (default, Sep 26 2013, 03:23:21) [GCC 4.7.3]
Set PythonHome to /home/foo/software/uwsgi-2.0.1
ImportError: No module named site
我将它部署在我的本地计算机上,并且可以正常工作。我该如何解决这个问题?
配置文件如下:
<uwsgi>
<socket>127.0.0.1:8630</socket>
<chdir>/home/foo/git/project/forum</chdir>
<module>wsgi</module>
</uwsgi>
我本地计算机上的控制台输出是:
[uWSGI] parsing config file forum/uwsgi.xml
*** Starting uWSGI 2.0.1 (64bit) on [Tue Feb 11 14:24:59 2014] ***
compiled with version: 4.7.3 on 11 February 2014 07:24:13
os: Linux-3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013
nodename: alienware
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /home/foo/project/osqa
detected binary path: /home/foo/uwsgi-2.0.1/uwsgi
*** WARNING: you are running uWSGI without its master process manager ***
your processes number limit is 62679
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 TCP address 127.0.0.1:8630 fd 6
Python version: 2.7.4 (default, Sep 26 2013, 03:23:21) [GCC 4.7.3]
Python main interpreter initialized at 0x23a6100
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 72760 bytes (71 KB) for 1 cores
*** Operational MODE: single process ***
WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x23a6100 pid: 21702 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI worker 1 (and the only) (pid: 21702, cores: 1)
最佳答案
如果您不使用 Virtualenv,则必须将 pythonpath
指令添加到您的配置文件中:
pythonpath = /usr/local/lib/python2.7/dist-packages
pythonpath = /usr/lib/python2.7
这是在 .ini 语法中,请根据您的 XML 配置对其进行调整。
关于python - uWSGI 重置 PythonHome,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21692803/
我试图在不允许我设置环境变量的系统上运行 python。是否有 python 的命令行标志将设置 PYTHONHOME?我在这里看了:http://docs.python.org/release/2.
所以我错误地运行了 Ubuntu Server (12.04)。我安装了 Python3 和 mod_wsgi 的 python3 版本。 Apache2 启动 - 但留下以下错误日志: [Mon M
我正在使用 nginx+django+uwsgi 来部署我的应用程序,但我发现它在我的主机上不起作用。错误是这样的: [uWSGI] parsing config file forum/uwsgi.x
在我的例子中,我将 Python 嵌入到我的应用程序中。当我的应用程序的路径包含非 latin-1 字符时,Py_Initialize 在内部调用 exit(1)(更多信息稍后)。 所以我检查了是否可
我在 C:\Python27 安装了 64 位 Python 2.7.5。 我的环境变量如下: Path: %PYTHONHOME%\Scripts; PYTHONHOME: C:\Python27;
我正在尝试设置我的 PYTHONPATH 和 PYTHONHOME 变量,但无法弄清楚! 尝试运行 python 时,出现错误 No module named site。 经过一番研究,这似乎是因为这
我对 Python 和 Django 真的很陌生......我想做的是: 在 Mac OS 10.6.8 上安装 Python 2.7 安装 pip 安装 Django 安装 virtualenvwr
我是一名优秀的程序员,十分优秀!