Python Forum
Can I make virtualenv (and/or uwsgi) use python 3.6 instead of 2.7?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I make virtualenv (and/or uwsgi) use python 3.6 instead of 2.7?
#2
The solution is to use pyenv (see: https://python-forum.io/Thread-pyenv-Sim...ight=pyenv )
If it's just for one virtual environment version, start a pyenv shell, selecting desired version, and then create the virtual env:

For a test case, assume global python version is 3.8 and you want a virtual environment that uses 3.7.4

From command line:
pyenv shell 3.7.4
python -m venv venv
Once created, you can exit the shell and then just activate the virtual environment normally, the set python version (3.7.4) in this instance will remain, even though your global python version is 3.8 or some other version.

you can globally change the python version to any installed version with:
pyenv global 3.7.4
Reply


Messages In This Thread
RE: Can I make virtualenv (and/or uwsgi) use python 3.6 instead of 2.7? - by Larz60+ - Nov-06-2019, 06:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  What do I put in the "module" argument in a uwsgi.ini file? david503 0 2,523 Nov-10-2019, 04:00 AM
Last Post: david503
  How to point a subdomain to run applications using virtualenv on ec2 (AWS) JohnnyCoffee 0 1,405 Oct-02-2019, 12:43 AM
Last Post: JohnnyCoffee

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020