The command is invalid after anaconda is installed on MAC —— you need to manually add path

1) Check environment variables:

sudo vi ~/.bash_profile
Copy the code

2) If conDA is not present in the environment variable, add it manually

export PATH=~/anaconda3/bin:$PATH
Copy the code

or

export PATH="/Users/anaconda3/bin:$PATH"
Copy the code

3) Refresh environment variables:

source ~/.bash_profile
Copy the code

validation

conda -V
Copy the code

or

python --version
Copy the code