pythonbashmacosanacondapython-install

Trouble running new Python version after uninstalling older and installing new (MAC)


I was trying to uninstall my Anaconda version of Python and reinstall the regular Python 3.5 version (mac). I used the answer from this SO question to remove the Anaconda folder using rm -rf ~/anaconda and using the Python website installed version 3.5.

But running python --version or python from command line returns this error:

Pauls-MacBook-Pro:~ paul$ python --version
-bash: /Users/paul/anaconda/bin/python: No such file or directory

Is there some bash script that is pointing the old deleted /Anaconda folder that is causing the 3.5 version to not run? I really don't want to mess with system files if I don't know what I'm doing


Solution

  • Based on your comments, it seems like bash has stored /Users/paul/anaconda/bin/python as the entry for python for performance reasons. hash -d python should remove this entry and use normal path resolution.