5

I'm trying to understand how to create an isolated python environment using an alternative version of Python other than the default (in my case this is Python 2.7). virtualenv works on my system with Python 2.7, but I can't seem to create a virtual environment with a version of Python 3.

I tried to specify the Python version as outlined in this this post, like this:

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

Can anyone explain how I can create a virtualenv with a specific version of Python? Thanks very much.

Community
  • 1
  • 1
drbunsen
  • 10,139
  • 21
  • 66
  • 94

1 Answers1

9

I believe you need to install python 3.2 to the system first. You're telling the virtualenvironment to use a version of python that doesn't exist anywhere so it cannot find it. This is the "does not exist"

Edit after more info was given in comment:

virtualenv -p /usr/local/bin/python3.2
wilbbe01
  • 1,931
  • 1
  • 24
  • 38
  • 1
    Thanks for the help. Perhaps I don't understand. I have Python 3.2 installed at: `/usr/local/bin/python3.2` Why can't it find it? – drbunsen Nov 05 '11 at 20:51
  • @dr.bunsen: In your question, you used `/usr/bin/` instead of `/usr/local/bin/`. Typo or simple solution? –  Nov 05 '11 at 20:54
  • 1
    Try using that path in your `virtualenv -p` command instead of `/usr/bin/python3.2` – wilbbe01 Nov 05 '11 at 20:54
  • 1
    Ahh, thanks! I didn't see that in fact usr/local/bin and usr/bin were in fact different paths. Thanks. – drbunsen Nov 05 '11 at 20:55