Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
first install all necessary packages like aptitude install python-pip python-dev libxml2-dev python3 python3-dev python2.6-dev
then virtual space is created
and uwsgi also needs to be built by activating virtual space first! Uwsgi is installed via "pip install uwsgi"
In Gentoo, just specify
USE_PYTHON="2.5 2.6 2.7 3.2"
in make.conf
and the selected python branches are at your service. Packages will be built for all required python versions. And no crutches.
It seems to have found the right direction, but not completely.
1) I install different versions in inux aptitude install python3 python3.1 python2.7
2
) I create a virtual environment with the required version of the interpreter
virtualenv TESTENV --python=python3 --no-site-packages
I run uwsgi with the config
But for some reason the default interpreter version 2,6,6 still starts version 3.1
workers - 4
buffer-size - 32768
сhmod-socket - 666
socket - /tmp/uwsgi.project2.sock
plugins - python
pythonpath - /usr/lib/python3.1
virtualenv - /var/www/env/TESTENV
module - wsgi
sudo apt-get install python2.6
sudo apt-get install python2.7
/usr/bin/python2.6
/usr/bin/python2.7
export PYTHON=/usr/bin/pythonX.X then
the idea is clear, right? ;)
I wonder how you use Python3 in your web projects??? what framework?
On a working computer, I did this (only for Windows, we were then forbidden to change the system):
1) Download from off. site required versions of python (required Windows Installer)
2) Unpack msi without installing
msiexec.exe /a msi name /qb TARGETDIR= unpacking path
For example: msiexec.exe /a python-2.7.2.msi /qb TARGETDIR=c:/python /2.7
3) Change the version of python you need through environment variables, for example, you can do this:
python-2.7.cmd python-3.2.cmd
@echo off
set PYTHONHOME=c:\python\2.7
set PATH=%PATH%;c:\python\2.7
@echo off
set PYTHONHOME=c:\python\3.2
set PATH=%PATH%;c:\python\3.2
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question