Every time I type python
into the console it uses Python 2.7. I would like it to use the latest version (I have it installed), Python 3.9. How do I do this using the fish shell (other StackOverFlow talks about for bash)?
Advertisement
Answer
First, look where it is installed :
ls -l /usr/local/bin/python*
note the line which ends with python3.9 without anything (as m for example) and type
ln -s -f /usr/local/bin/python3.9 /usr/local/bin/python
where ‘/usr/local/bin/python3.9’ is what you have copied from above.
type in a new session
python --version
should be ok..