相关文章推荐
绅士的茴香  ·  安装cplex到python_mob64ca ...·  1 周前    · 
个性的饼干  ·  实用的 Python 之 ...·  5 天前    · 
干练的火锅  ·  view ui ...·  1 年前    · 
苦闷的弓箭  ·  【Seaborn】sns.displot() ...·  1 年前    · 
眼睛小的啄木鸟  ·  WPF Spreadsheet - ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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.

Thx for this question. Got an UnsatisfiableError on CUDA driver when I tried to install keras in a conda env with python 3.8. Changing to python v. 3.7 solved the issue. arun Aug 14, 2020 at 0:24

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

conda activate my_env
conda install python=3.6
                @B.Quaink That sounds very unlikely. If true, please create a new post providing the exact steps you took  (including OS) and then link back.
– Alexander
                Dec 17, 2020 at 4:42
                I created a new environment and then set up the python version, that worked. Maybe the base(root) environment isn't changeable? I followed your steps above, it said it changed but when I started up python the newer version was still there.
– B.Quaink
                Dec 22, 2020 at 11:12
                I had to conda uninstall python then I could install a new version. Otherwise the version did not change for me.
– Josiah Coad
                May 8, 2021 at 0:30
                Not in particular, the existing solution didn't work for me and this did so felt like sharing :). I would imagine upgrade would work too
– jacktim
                May 13, 2022 at 9:52
                @JeffBezos Some preliminary research suggests that should not be the case stackoverflow.com/questions/11248073/…. I will test it though - if it does I will update the answer to make people aware.
– jacktim
                Feb 1 at 21:09

Rebuild a new environment, for example called "myenvi"

conda create --name myenvi python=3.6

And make sure the version by

python --version
                While your way solves the problem, the OP asked for a way that would allow them to keep the existing environment. So, this answer does not really help here.
– kyriakosSt
                Nov 15, 2020 at 15:37

If you already have existing python installation may be in other environment, you can simply use it as base.

Here's what you need to do:

conda activate base
conda install python=3.6

Note: This will activate root environment. and python 3.6 already installed, it will simply replace it.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.