Đây là cách tôi đạt đến một uwsgi làm việc (Ubuntu 14.04, mặc định Python 2.7.6) với Python-2.7.10.
bước
Trước khi tiếp tục, bạn phải biên dịch Python mới với --enable-shared
:
$ ./configure --enabled-shared
$ sudo make altinstall
Bối cảnh: Ubuntu 14.04 với Python 2.7.6 với uwsgi và uwsgi-python-plugin được cài đặt với apt- nhận được Vấn đề: Tôi có một virtualenv cho tất cả của tôi với biên dịch Python-2.7.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)
Chuẩn bị thứ:
$ 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"
Mở tập tin ini:
[uwsgi]
plugins = python27
Kết quả trên:
** 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]
bạn đang sử dụng phiên bản OS/python nào? –
Tôi đang chạy máy chủ Ubuntu 11.04. Python 2.7.1 – rlayte
Tôi đã có cùng một điều xảy ra trên máy Mac, trong khi cố gắng xây dựng một dự án python được truy cập thông qua một thư mục chia sẻ samba. –