MacOS – The terminal on the Mac does not work anymore after installing Python & Sublime Text

bashmacospythonterminal

I was trying to install Python3, and Sublime Text 3 in order to learn and run Python. Unfortunately, I watched some videos on youtube and tried to follow their instructions, I did something with my Terminal and now it does not work at all. Please explain and show me how to fix it!

In Terminal it shows:

Last login: Sun May  1 18:44:16 on ttys000
Lances-MacBook-Pro:~ lancedang$ touch
-bash: touch: command not found
Lances-MacBook-Pro:~ lancedang$ python
-bash: python: command not found
Lances-MacBook-Pro:~ lancedang$ python3
-bash: python3: command not found

Best Answer

Your PATH environment variable seems to have been changed somewhere.

Type the following command at your Terminal prompt:

echo 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/bin:$PATH' >> ~/.bash_profile

Exit terminal and the shell by typing exit and closing the Terminal app. Relaunch.

Everything should be working now.