How do I clone a conda environment from one python release to another?

One way would be to

conda list --export > exported-packages.txt

And then edit that file to remove the last part of each package with the py27_0 parts (you might also want to remove the versions, in case some version of a package doesn't have a Python 3 version). Then

conda create -n py3clone --file exported-packages.txt

Another idea would be to clone the environment:

conda create -n clonedenv --clone oldenv
conda install -n clonedenv python=3.4
conda update -n clonedenv --all

Note that obviously both of these will fail if you have some package that doesn't have a Python 3 version.

Tags:

Python

Conda