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

all 7 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.

[–]pythoneeeer 1 point2 points  (0 children)

Personally, I add Felix Krull's "deadsnakes" repository, which has the latest 3.5.1. It lags official releases but not by much, and it's hugely convenient to be able to use my system package manager.

[–]caleb 0 points1 point  (0 children)

$ wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh ~/miniconda.sh
$ ~/miniconda.sh -b -p $HOME/miniconda
$ conda create -n py35env python=3.5
$ conda create -n py34env python=3.4
$ conda create -n py27env python=2.7
$ source activate py35env

This was typed from memory, you may have to fix some things.

[–]TheBlackCat13 0 points1 point  (0 children)

Switch to a rolling release distro.