2

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

6
  • 1
    What happens when you run which python? Commented Aug 21, 2016 at 19:28
  • 1
    @SpruceBondera /Library/Frameworks/Python.framework/Versions/2.7/bin/python Commented Aug 21, 2016 at 19:28
  • What about type python? Commented Aug 21, 2016 at 19:30
  • python is hashed (/Users/paulgerhartz/anaconda/bin/python) Commented Aug 21, 2016 at 19:31
  • 1
    Try hash -d python. That should fix it, however you should then try restarting bash and seeing if the incorrect entry is being added on startup. Commented Aug 21, 2016 at 19:33

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.