Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change python version in Anaconda?

I am trying to get into deep learning. I installed Anaconda to use jupyter and generally not to care about installing all of those packages like matplotlib etc myself. But I cannot install tensorflow as it works only with Python 3.4, 3.5, or 3.6 but I have 3.7. After I read about it I installed python 3.6.8. I uninstalled Anaconda and installed it again, nothing changed. After that, I used this command

conda install python=3.6.8

to presumably install python 3.6.8 for it (I found this solution somewhere on the web). The command worked but didn't change anything. Please help

like image 355
John Avatar asked Feb 06 '19 17:02

John


People also ask

Can I change Python version in Anaconda?

Use the conda update Command on the Anaconda Command Prompt If you want to change the version of Python to the latest version, you can do so by utilizing conda update command.

How do I change the default version of Python in Anaconda?

Anaconda uses a default environment named base and you cannot create a new (e.g. python 3.6) environment with the same name. This is intentional. If you want your base Anaconda to be python 3.6, the right way to do this is to install Anaconda for python 3.6.

How do I get Python 3.9 on Anaconda?

So, how do I install python 3.9 in a conda env with all functionalities like pip working? This can be installed via conda with the command conda install -c anaconda python=3.9 as per anaconda.org/anaconda/python. running conda update --all may resolve some dependency failures.


1 Answers

A better (recommended) alternative is to create a virtual environment of the desired Python version and then use that environment to run Tensorflow and other scripts.

To do that, you can follow the instructions given here.

BUT, if you don't want to create a separate environment, then conda install python=<version> should do.

OR (not recommended) you can download the "latest" Anaconda installer with your required Python version bundled.

Source

like image 200
MaJoR Avatar answered Sep 29 '22 16:09

MaJoR