The latest version of Anaconda comes with Python 3.7. But sometimes you need to use an earlier release. For example, as of today (2019-02-28), TensorFlow does not yet work with the latest release of Python. The preferred way to use a previous version is to create a separate conda environment for each project.

To create a fresh conda environment called tensorflow with Python 3.6 and its own pip, run the following:

conda create --name tensorflow python=3.6 pip

From there you can activate the tensorflow environment and then pip or conda install whatever you need. For example:

conda activate tensorflow
conda install tensorflow
pip install ipython matplotlib

Then to return to the base environment, just run conda deactivate.

If possible, use the above approach to manage different versions on Python on your machine. However, if you really need to, you can change the base version of Python with a one-liner.

conda install python=3.6

If you confirm that you want to proceed, conda will replace all the version 3.7 packages in your environment with their corresponding 3.6 versions.

Want more? Join the mailing list.