In the console Python version still shows 2.7 instead of 3 and based on the command given in the Python foundations course to change the version to 3 it throwing an error.
Please help updating console to version 3
Hi, Deepak.
Kindly export this path from the web-console.
export PATH=/usr/local/anaconda/bin:$PATH
Now Python3 will be available.
In Jupyter Python3 is already there.
All the best!
Yesterday it started showing V3 after your update but today again i checked and it’s showing me V2. Why it is so ?
Yes, for every time you want to use Python3 you need to export the PATH.
Python3 is present as anaconda Python in the “/usr/local/anaconda/bin” by exporting you are making that path variable(PATH) available in your current program.
All the best!
It’s throwing the below error when i copy paste the below path
export PATH=/usr/local/anaconda/bin:$PATH
^
SyntaxError: invalid syntax
export PATH=/usr/local/anaconda/bin:$PATH
File “”, line 1
export PATH=/usr/local/anaconda/bin:$PATH
But it’s still throwing same error in my pc. can you please let me know what’s the reason ?
I understood the error you are doing.
You are exporting the path variable from Python shell, but you need to do it in your web-console.
your_username ~]$ export PATH=/usr/local/anaconda/bin:$PATH
your_username ~]$ python --version
Now you will be able to use Python3.
Kindly refer the screenshots I previously shared.
All the best!