Search code examples
miniconda

How do I install (both) miniconda2 and miniconda3 side-by-side


I need to use programmes (pipelines) written for miniconda2 (py2) as well as separate one written for miniconda3 (py3). How do I install miniconda2 and miniconda3 side-by-side and then easily switch between them both?


Solution

  • You are approaching this from the wrong direction. Only install one of them (i.e. miniconda3). The only difference is which python version is installed in the base environment. For different python versions, simply create different environments instead of having seperate conda installations. After installing miniconda3, simply do

    conda create -n py2 python=2.7
    conda create -n py3 python=3.x
    

    replacing 3.x with the version you actually need. Then selectively do

    conda activate py2
    

    to get to python2 or

    conda activate py3
    

    to get to python 3