Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Plugins uwsgi python3插件不';行不通_Plugins_Python 3.x_Compilation_Uwsgi_Python 3.3 - Fatal编程技术网

Plugins uwsgi python3插件不';行不通

Plugins uwsgi python3插件不';行不通,plugins,python-3.x,compilation,uwsgi,python-3.3,Plugins,Python 3.x,Compilation,Uwsgi,Python 3.3,我用make编译了uwsgi,它已经成功地完成了,现在我决定用python3.3运行我的django1.5站点。我已经检查了doc()并通过apt get设置了python3.3开发头,然后通过以下方式编译插件: python3.3 uwsgiconfig.py——插件插件/python包python33 然后它说: using profile: buildconf/package.ini detected include path: ['/usr/lib/gcc/i686-linux-gnu/

我用make编译了uwsgi,它已经成功地完成了,现在我决定用python3.3运行我的django1.5站点。我已经检查了doc()并通过apt get设置了python3.3开发头,然后通过以下方式编译插件:

python3.3 uwsgiconfig.py——插件插件/python包python33

然后它说:

using profile: buildconf/package.ini
detected include path: ['/usr/lib/gcc/i686-linux-gnu/4.7/include', '/usr/local/include','/usr/lib/gcc/i686-linux-gnu/4.7/include-fixed', '/usr/include/i386-linux-gnu', '/usr/include']
*** uWSGI building and linking plugin plugins/python ***
[i686-linux-gnu-gcc -pthread] /usr/lib/uwsgi/python33_plugin.so
*** python33 plugin built and available in /usr/lib/uwsgi/python33_plugin.so ***
看起来一切都做得很好,我确实在那个目录中找到了python33_插件。 nginx正在运行并且正常,现在我的uwsgi ini文件如下:

[uwsgi]  
socket=0.0.0.0:8000 
listen=20
master=true
pidfile=/usr/local/nginx/uwsgi.pid
processes=2
plugins=python33
module=django_wsgi
pythonpath=
profiler=true
memory-report=true
enable-threads=true
logdate=true
limit-as=6048
当我运行“sudo./uwsgi-uwsgi.ini”时

它找不到.so文件。无论如何,我将.so文件复制到uwsgi目录,然后再次运行

[uWSGI] getting INI configuration from uwsgi.ini
Sun Apr 28 22:54:40 2013 - *** Starting uWSGI 1.9.8 (32bit) on [Sun Apr 28 22:54:40 2013] ***
Sun Apr 28 22:54:40 2013 - compiled with version: 4.7.3 on 28 April 2013 21:25:27
Sun Apr 28 22:54:40 2013 - os: Linux-3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:19:42 UTC 2013
Sun Apr 28 22:54:40 2013 - nodename: bill-Rev-1-0
Sun Apr 28 22:54:40 2013 - machine: i686
Sun Apr 28 22:54:40 2013 - clock source: unix
Sun Apr 28 22:54:40 2013 - pcre jit disabled
Sun Apr 28 22:54:40 2013 - detected number of CPU cores: 4
Sun Apr 28 22:54:40 2013 - current working directory: /media/bill/cloud/cloud/program/kkblog/kkblog
Sun Apr 28 22:54:40 2013 - writing pidfile to /usr/local/nginx/uwsgi.pid
Sun Apr 28 22:54:40 2013 - detected binary path: /usr/sbin/uwsgi
Sun Apr 28 22:54:40 2013 - uWSGI running as root, you can use --uid/--gid/--chroot options
Sun Apr 28 22:54:40 2013 - *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
Sun Apr 28 22:54:40 2013 - your processes number limit is 31552
Sun Apr 28 22:54:40 2013 - limiting address space of processes...
Sun Apr 28 22:54:40 2013 - your process address space limit is 2046820352 bytes (1952 MB)
Sun Apr 28 22:54:40 2013 - your memory page size is 4096 bytes
Sun Apr 28 22:54:40 2013 - detected max file descriptor number: 1024
Sun Apr 28 22:54:40 2013 - lock engine: pthread robust mutexes
Sun Apr 28 22:54:40 2013 - uwsgi socket 0 bound to TCP address 0.0.0.0:8000 fd 3
Sun Apr 28 22:54:40 2013 - Python version: 2.7.4 (default, Apr 19 2013, 18:35:44)  [GCC 4.7.3]
Sun Apr 28 22:54:40 2013 - Python main interpreter initialized at 0x973e2d0
Sun Apr 28 22:54:40 2013 - python threads support enabled
我使用的是Ubuntu13.04,python2.7和python3.3都是预装的

我设置了PYTHON33插件,但是UWSGI仍然发布PYTHON2.7,为什么

有人遇到过这个问题吗?顺便说一下,我不喜欢通过apt-get设置uwsgi和插件,因为它在任何PaaS上都不起作用


谢谢

您已经构建了一个嵌入python 2.7的单片uWSGI二进制文件,因此插件无法覆盖该内存区域。您可以使用以下方法构建简单的整体python3二进制文件:

python3 uwsgiconfig.py --build
或者对python3使用pip

否则,您可以构建具有以下功能的完全模块化系统:

python uwsgiconfig.py --build core
python uwsgiconfig.py --plugin plugins/python core python27
python3 uwsgiconfig.py --plugin plugins/python core python33

你好,罗伯特。我在哪里可以找到uwsgiconfig.py?谢谢你的帮助。@aldesabido现在它的工作方式有点不同了。现在,我们从同一个目录开始构建Python插件:uwsgi是什么?你能详细讲一下吗--构建插件PYTHON=python3.4./uwsgi--构建插件“plugins/python34”PYTHON=python2.7./uwsgi--构建插件“plugins/python27”python2.6./uwsgi--构建插件“plugins/python26”
python uwsgiconfig.py --build core
python uwsgiconfig.py --plugin plugins/python core python27
python3 uwsgiconfig.py --plugin plugins/python core python33