Getting error "/usr/bin/python3.9: bad interpreter: No such file or directory" after installing pip in ubuntu 16.04

Viewed 2112

I installed python3.9 in ubuntu and also make it default which creates some problems. So I again make python 3.5 as default and removed python 3.9.

Then I tried to install pip by using command:

sudo apt-get install python3-pip

and it installed successfully but when I ran:

pip3 --version

it gives me this error:

/usr/bin/python3.9: bad interpreter: No such file or directory

I don't know why I removed python 3.9 completely with all its dependencies then why pip is not installing properly?

Please help me out here i'm really stuck.

2 Answers

This answer might help, you can run pip as a module, try python3 -m pip [commands] to see if it works.

Try running:

pip --version

It might work.

Related