Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make python3 as my default python on Mac for Fish shell

Tags:

python

shell

fish

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)?

like image 783
Henry Avatar asked Sep 02 '25 17:09

Henry


1 Answers

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..

like image 116
Lumber Jack Avatar answered Sep 05 '25 05:09

Lumber Jack