![]() ![]() Then in your uWSGI configuration ( project.ini) files, specify the plugin directory and the plugin: plugin-dir = /usr/local/lib/uwsgi/plugins For example, for python3.8: ln -s /usr/local/src/uwsgi/python38_plugin.so /usr/local/lib/uwsgi/plugins Symlink the created plugins to this directory. uwsgi -build-plugin "plugins/python python38"Ĭreate a plugin directory in an appropriate location: mkdir -p /usr/local/lib/uwsgi/plugins/ uwsgi -build-plugin "plugins/python pythonXX"įor example, for python3.8: PYTHON=python3.8. Symlink the versioned folder uwsgi-X.X.X.X to give it the generic name, uwsgi: ln -s /usr/local/src/uwsgi-X.X.X.X /usr/local/src/uwsgiĬreate a symlink to the build so it's on your PATH: ln -s /usr/local/src/uwsgi/uwsgi /usr/local/binīuild python plugins for the versions you need: PYTHON=pythonX.X. For pcre, on a Debian-based distribution use: apt install libpcre3 libpcre3-devĭownload and build the latest uWSGI source into /usr/local/src, replacing X.X.X.X below with the package version (e.g. Make sure you have any dependencies installed. You'll need root privileges for this.įirst you may want to install multiple system-wide python versions. If you want a system-wide uWSGI build, you can build it from source and install plugins for multiple python versions. Install uWSGI from source and build python plugins ~/.virtualenvs/venv-name/lib/pythonX.X/site-packages/uwsgi -ini path/to/ini-file One option would be to simply install uWSGI with pip in your virtualenvs and start your services separately: pip install uwsgi Is this possible? Or am I going to have to run multiple emperors if I want to run multiple pythons? Kinda defeats the purpose of having virtual environments. What I'd like to be doing is running the uwsgi master process with the system python, but the various vassals (applications) with their own python and their own libraries. I was under the impression that the emperor could be any python version, as the vassal would be launched with its own python and environment, launched by the master process. The uwsgi is the system uwsgi (python2.6). The virtualenv for my site is created as a python 3.4 pyvenv. I'm seeing the following error in the emperor log: Traceback (most recent call last): Virtualenv=/home/django/sites/mysite/venv/bin I have uwsgi running in emperor mode, and I'm trying to get the vassals to run in their own virtualenvs, with a different python version. I'm trying to deploy django with uwsgi, and I think I lack understanding of how it all works. ![]()
0 Comments
Leave a Reply. |