這是我使用Python-2.7.10實現了工作uwsgi(Ubuntu 14.04,默認Python 2.7.6)。
步驟
在繼續之前,您必須編譯新的Python與--enable-shared
:
$ ./configure --enabled-shared
$ sudo make altinstall
語境的Ubuntu 14.04使用Python 2.7.6與APT-安裝uwsgi和uwsgi-蟒蛇,插件得到 問題:我爲編譯Python-2.7的所有人準備了virtualenv。10
# Previously installed Python-2.7.10 as altinstall
$ python2.7
Python 2.7.10 (default, Nov 25 2015, 11:21:38)
$ source ~/env/bin/activate
$ python
Python 2.7.10 (default, Nov 25 2015, 11:21:38)
準備的東西:
$ cd /tmp/
$ git clone https://github.com/unbit/uwsgi.git
$ cd uwsgi
$ make PROFILE=nolang
# On /tmp/uwsgi
$ PYTHON=python ./uwsgi --build-plugin "plugins/python python27"
在ini文件:
[uwsgi]
plugins = python27
結果上:
** Starting uWSGI 1.9.17.1-debian (64bit) on [Thu Nov 26 12:56:42 2015] ***
compiled with version: 4.8.2 on 23 March 2014 17:15:32
os: Linux-3.19.0-33-generiC#38~14.04.1-Ubuntu SMP Fri Nov 6 18:17:28 UTC 2015
nodename: maquinote
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 12
current working directory: /etc/uwsgi/apps-enabled
detected binary path: /usr/bin/uwsgi-core
your processes number limit is 257565
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: enabled
uwsgi socket 0 bound to UNIX address /var/run/uwsgi/app/pypi-server/socket fd 3
Python version: 2.7.10 (default, Nov 26 2015, 11:44:40) [GCC 4.8.4]
你使用的是什麼操作系統/ python版本? –
我正在運行Ubuntu服務器11.04。 Python 2.7.1 – rlayte
我在Mac上嘗試構建一個通過samba共享文件夾訪問的python項目時,發生了同樣的情況。 –