Command Not found upon opening Terminal
Something in your startup files is trying to call a command called Setting which isn't a command that exists. You can debug your start up files by running:

bash -x -l


and watching the output -- you'll see all the commands that are being run on startup and hopefully spot the line where Setting is trying to be used as a command. If you want to post your startup files more help might be possible.


  What do you mean by "startup files"? 


When your bash shell starts, it reads and executes a bunch of standard startup files to setup your environment. It usually starts with /etc/profile and then everything in the /etc/profile.d/*.sh directory. Then it moves on to the user-level ~/.bash_profile and ~/.bashrc files.

Based on the output you posted your problem is here:

++ '[' -z '' ']'
++ PROMPT_COMMAND='update_terminal_cwd; '
+ Setting PATH for Python 2.7
bash: Setting: command not found


You have the literal line:

Setting PATH for Python 2.7


in one of the startup files. It should either be prefixed with echo or commented out with a # character.

Try and find the file by running these commands in a Terminal:

grep -H Setting /etc/bashrc /etc/profile ~/.bash_profile ~/.bashrc


From the depth marker, the single + in that output, it's in a top-level file, not something being sourced from one of them.

If that grep command matches it'll print the file name. Find the line and add a # to the front of it to comment it out. For example, change:

Setting PATH for Python 2.7


to:

# Setting PATH for Python 2.7


in the file where grep reports the line.