TransWikia.com

Running command-line tools giving python3 bad interpreter, no such file or directory error

Super User Asked by j---xyz on December 20, 2021

I have two versions of python installed on a server: /usr/local/bin/python3 (version 3.6.3) /home/ubuntu/miniconda2/bin/python (version 2.7.15)

Earlier today I removed python version 3.6.3 and 3.4.0 and 3.7.0 using sudo rm -r (My MISTAKE!!) that was under /usr/bin/python. I thought this would be fine since I had /home/ubuntu/miniconda2/bin/python (version 2.7.15).

I’m running a few command-line tools that are written in python and they generate the error: –bash: /usr/lib/command-not-found: /usr/bin/python3: bad interpreter: No such file or directory

Yet, if I just execute python python seems to be working.

Not sure what’s causing this error? Additionally pip3 is also causing the same -bash: /usr/lib/command-not-found: /usr/bin/python3: bad interpreter: No such file or directory error.

Update:
I removed python3 because this was something I installed myself anyway.
You’re going to laugh but this is Ubuntu 14.04.1. Not by choice! Someone else set up this shared server before I came along, and no one ever updated.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP