Search code examples
pythonversioncondavirtual-environment

How to change Python version of existing conda virtual environment?


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

I have miniconda installed.


Solution

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

    conda activate my_env
    conda install python=3.6