Unable to Switch to Python 3 in Terminal as guided in Tutorial

Hi,

I am unable to switch to Python3 in terminal, kindly see the below screenshot of the error.

[mukeshkumarojha1189@cxln5 ~]$ export PATH=/usr/local/anaconda/bin:$PATH
[mukeshkumarojha1189@cxln5 ~]$ source activate py36
Could not find conda environment: py36
You can list all discoverable environments with conda info --envs.
[mukeshkumarojha1189@cxln5 ~]$

Hi, Mukesh.

After exporting no need to activate, as the PATH variable will be available in your current environment working place.
When you create a virtual space then you need to activate
KIndly refer below!

below one helped
[mukeshkumarojha1189@cxln5 ~]$ export PATH=/usr/local/anaconda/bin:$PATH python3
[mukeshkumarojha1189@cxln5 ~]$ python3
Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)
[GCC 7.3.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

yes, that is the command to export the PATH variable from the anaconda python.
Now to check the versions type python --version in your web-console, it should be python 3.6.8

hey, each time i am looging in it is going back to python2. How can set a permanent path?

Hi,

Yes. by default Python is Python2 in web-console. So need to export path for every login or session.

But you can use Python3 in Jupyter notebook permanently as the environment in which Jupyter is running has Python3.

All the best!