Difficulty using virtualenv and a specific version of Python?

I am trying to understand how to create a python sandbox using an alternate version of Python that is different from the standard (in my case, Python 2.7). virtualenv runs on my system with Python 2.7, but I cannot create a virtual environment with Python 3.

I tried to specify the version of Python described in this post , for example:

 $ virtualenv -p /usr/bin/python3.2 

Can someone explain how I can create virtualenv with a specific version of Python? Thank you very much.

+4
source share
1 answer

I believe that you need to install python 3.2 on the system first. You are telling the virtual environment to use a version of python that does not exist anywhere, so it cannot find it. This "does not exist"

Edit after more details was given in the comment:

 virtualenv -p /usr/local/bin/python3.2 
+8
source

Source: https://habr.com/ru/post/1379813/


All Articles