1

So I am trying to create a virtualenv with the Python version 3.5. I ran this command virtualenv -p python3.5 myenv and got this:

Running virtualenv with interpreter /usr/bin/python3.5
Using base prefix '/usr'
New python executable in myenv/bin/python3.5
Also creating executable in myenv/bin/python
Please make sure you remove any previous custom paths from your /home/vagrant/.pydistutils.cfg file.
Installing setuptools, pip...done.

But when I enter python this version shows up instead:

Python 3.4.0 (default, Apr 11 2014, 13:05:11) 
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

I'm not sure what I am doing wrong here. Has anybody else ran into this issue?

Edit: Tried source myenv/bin/activate then python and still getting the same Python version 3.4

skrx
  • 19,980
  • 5
  • 34
  • 48
Planet_Man
  • 101
  • 1
  • 1
  • 5

1 Answers1

0

You aren't activating vitualenv. Try doing:

source myenv/bin/activate

and run

python

For more information refer to this post. To better understand about virtualenv refer this guide.

PseudoAj
  • 5,234
  • 2
  • 17
  • 37