简体   繁体   English

在 ubuntu 16.04 中安装 pip 后出现错误“/usr/bin/python3.9: bad interpreter: No such file or directory”

[英]Getting error “/usr/bin/python3.9: bad interpreter: No such file or directory” after installing pip in ubuntu 16.04

I installed python3.9 in ubuntu and also make it default which creates some problems.我在 ubuntu 中安装了 python3.9 并将其设为默认值,这会产生一些问题。 So I again make python 3.5 as default and removed python 3.9.所以我再次将 python 3.5 作为默认值并删除了 python 3.9。

Then I tried to install pip by using command:然后我尝试使用以下命令安装 pip:

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?我不知道为什么我完全删除了 python 3.9 及其所有依赖项,那么为什么 pip 没有正确安装?

Please help me out here i'm really stuck.请帮助我在这里我真的被困住了。

这个答案可能会有所帮助,您可以将pip作为模块运行,尝试python3 -m pip [commands]看看它是否有效。

Try running:尝试运行:

pip --version

It might work.它可能会起作用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 /usr/bin/python:错误的解释器:安装 python 2.7 后没有这样的文件或目录 - /usr/bin/python: bad interpreter: No such file or directory after installing python 2.7 错误的解释器没有这样的文件或目录 /usr/bin/python - bad interpreter no such file or directory /usr/bin/python pip安装/usr/local/opt/python/bin/python2.7:错误的解释器:没有这样的文件或目录 - pip installation /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory / usr / local / bin / python3:错误的解释器:ubuntu 14.04没有这样的文件或目录 - /usr/local/bin/python3: bad interpreter: No such file or directory for ubuntu 14.04 Python / usr / bin / env:错误的解释器:不是目录 - Python /usr/bin/env: bad interpreter: Not a directory 运行 pipenv, mkdocs 时出错:/usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory - Error running pipenv, mkdocs : /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory 如何修复 /usr/local/bin/virtualenv: /usr/bin/python: 错误的解释器:没有这样的文件或目录? - How to fix /usr/local/bin/virtualenv: /usr/bin/python: bad interpreter: No such file or directory? VIRTUALENV bash:/ usr / local / bin / virtualenv:/ usr / bin / python:错误的解释器:没有这样的文件或目录 - VIRTUALENV bash: /usr/local/bin/virtualenv: /usr/bin/python: bad interpreter: No such file or directory 该烧瓶错误是什么意思? / usr / local / bin / flask:错误的解释器:/usr/local/opt/python/bin/python2.7:没有这样的文件或目录 - What does this flask error mean? /usr/local/bin/flask: bad interpreter: /usr/local/opt/python/bin/python2.7: no such file or directory zsh:/usr/local/bin/pipenv:错误的解释器:/usr/local/opt/python/bin/python3.7:没有这样的文件或目录 - zsh: /usr/local/bin/pipenv: bad interpreter: /usr/local/opt/python/bin/python3.7: no such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM