I was banging my head off the wall trying to change the path of pip install on my Ubuntu install. I guessed that it may have been the number of Python installations on my machine. I ended up accidentally deleting python and python3 from /usr/bin/.
Now nothing works. Both apt-get and sudo no longer work. Every command I run, I get the same output:
-bash: /usr/lib/command-not-found: /usr/bin/python3: bad interpreter: No such file or directory
I deleted the contents of /home/ubuntu/usr/bin. I was able to re-create that folder and I copied the files from /root/usr/bin/. I have also copied python3 and python into /home/ubuntu/usr/bin.
I am still getting the error:
-bash: /usr/lib/command-not-found: /usr/bin/python3: bad interpreter: No such file or directory
I am honestly navigating in the dark, any help would greatly appreciated.
/usr/bin/pythonand/or/usr/bin/python3? If the latter, it should be a simple matter of recreating the symlinks. If you need help with that, please [edit] your question to include the output ofls -ld /usr/bin/python[23].[0-9]– steeldriver Jan 21 '21 at 22:09/usr/bindirectory, then you will have a lot more issues than just python unfortunately – steeldriver Jan 21 '21 at 23:18