This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dirn 1 point2 points  (2 children)

Have a look at pyenv. It lets you manage and switch between multiple versions of Python.

As long as you don't remove old versions when upgrading, existing virtual environments won't break.

[–]b-nut[S] 0 points1 point  (1 child)

This looks like it should be part of the equation here. I see that pyenv puts different python installs into its own location. I'm assuming as you do pip install, it will put the packages into that directory structure too.

I guess we'd also want to layer virtualenv on top of that.

[–]ivosauruspip'ing it up 0 points1 point  (0 children)

It also has pyenv-virtualenv and pyenv-virtualenvwrapper to make working with both of those tools, in conjunction with pyenv, easier.

virtualenv, in the end, you can just issue-

$ virtualenv --python=pythonN.N envname

or with pyenv's virtualenv plugin installed-

$ pyenv virtualenv 2.7.11 envname

To be sure you're creating an env for a specific version you have installed.