Answer the question
In order to leave comments, you need to log in
Multiple python versions on nginx, how to choose default version?
I use the homestead image, it has python 2.7 and python 3.4. nginx server. The default is 2.7. How to make it used 3.4? I know that you can also use a virtual environment, I figured out how to set it up, but not how to use it :) I'm just starting to work with python, I will be grateful for any advice!
Answer the question
In order to leave comments, you need to log in
habrahabr.ru/post/203516
virtualenv
but look at the tasks, you can’t completely refuse 2.7, so sometimes it may not matter what is there by default (although, of course, the 3rd Python is unicode, etc.)
1) It is impossible to set the 3rd python by default.
2) To work interactively in the console with python from virtualenv, you need to go to the folder with env and source bin/activate
3) To run the script from python from env:/home/your_name/env/bin/python some_script.py
there is python 2.7 and python 3.4.
#!/usr/bin/python3
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question