Search code examples
python-2.7anacondaminiconda

Deleted miniconda folder, python won't run


I installed/ miniconda in the following directory:

/home/arturo/Documents/project1/pwd

but then I deleted it by typing:

rm -r pwd/

Now I can't run python anymore (from any directory). Not really sure what happened. I get this error:

bash: /home/arturo/Documents/project1/pwd/bin/python: No such file or directory

Solution

  • You have at least two choices:

    1. Reinstall miniconda, into the same location as before.
    2. Clear the executable cache with hash -r to eliminate the stale entry, which ties the python command to non-existent /home/arturo/Documents/project1/pwd/bin/python cf. What is the purpose of the hash command?