Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

changing alias to python3 in zsh

I am using zsh shell and I am trying to change default python in my mac which is currently python2.

I am getting the following:

➜ alias python = 'python3'
zsh: bad assignment

Why is it happening?

like image 790
hi15 Avatar asked Jul 12 '26 04:07

hi15


1 Answers

Remove the whitespace before and after the equal sign.

alias python='python3'

As a sidenote, you'll want to put this line in the .zshrc file if you want the alias to persist.

like image 169
Jacob Rodal Avatar answered Jul 14 '26 09:07

Jacob Rodal