Strange path environment

path

Is it normal to have all this stuff in my path environment?

/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin

It seems I have included the same path many times. I have installed and uninstalled Python 3.4 and Python 3.4.1 a few times because I am still having problems in making the IDLE work correctly due to Tcl/Tk libraries compatibility and stability problems with Mac OS X. Is this maybe the reason of having apparently the same path repeated?

Best Answer

The issue is how you have uninstalled python. Deleting the app does remove the code but does not affect anything you have changed elsewhere will not have been undone. In this case the changes to the path have not been undone and as the installer is a simple one it keeps adding the new bit of the path to the existing path.

To fix the path you need to find the file where the PATH environment variable is altered. If you are using the bash shell (the default in recent OSX) then. . ideally it should be ~/.bashrc but probably ~/.profile or ~/.bash_profile. See other questions or manuals on what startup file bash uses) Then edit this file so that you have only one Python in it, the lines changing PATH will begin export PATH=

In general things are uninstallable if only you know exactly what they changed in install and what they write to at run time. There is no generic way to do this. The best apps have uninstallers which will do the best. You can stop the app running by deleting the .app bundle and most configuration takes up little disk space so the cost of leaving it is not high. Also most .apps do not need edits in bash files so are more self contained.