melatonin15
melatonin15

Reputation: 2279

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?

Upvotes: 3

Views: 9194

Answers (1)

Jacob Rodal
Jacob Rodal

Reputation: 650

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.

Upvotes: 14

Related Questions