Problem:
I have the 3.6 version of python as default version. I want to use python 3.4 (because I have problems installing bpython due to the version of Visual c++ installed on my computer. I should disinstall Visual Studio 2015... but I choose this solution to avoid the need to reinstall it for different purposes).
I thought: I could use virtualenv.
I had it for python 3.4, but now that I have the 3.6 version I have to install it again. Go in the cmd (win+r)* and write:
pip install virtual env
*if you want to start the cmd from a dir, right click on the dir and choose from the menu... start the cmd from here.
then I create a directory where to install my environment for the 3.4 version. We have to start virtualenv with the -p followed by the dir where is the version of python that we want to use and then the dir where we want to put the environment (p34 in this case):
virtualenv -p c:\python34_32bit\python.exe p34
Now go in the p34/Scripts dir
cd p34/Scripts
then...
activate
you will see the (p34) appear on the left of the prompt, this will tell you are in the environment ...
to check if the version is the right one, type python and you will see that the version is that, the 3.4.
Comments
Post a Comment