How to change Python version of existing conda virtual environment?

elixirtrip picture elixirtrip · Dec 3, 2019 · Viewed 28.4k times · Source

I created conda environment with Python version 3.8, but it doesn't support matplotlib... So I am looking for something like this to change Python version: conda env my_env update to python=3.6. Is it possible ore I need to recreate environment

I have miniconda installed.

Answer

Alexander picture Alexander · Dec 3, 2019

Activate the relevant environment, then install your target python version.

conda activate my_env
conda install python=3.6