gpt4 book ai didi

python -/usr/local/bin/pip : bad interpreter:/usr/local/opt/python/bin/python3. 7

转载 作者:行者123 更新时间:2023-12-03 14:22:17 31 4
gpt4 key购买 nike

在尝试掌握 pipenv 后,我的 python 安装和各种软件包出现问题(显然不顺利)。

➜ which Python
/usr/bin/Python

➜ which python3.8
/usr/local/bin/python3.8
然后我运行的任何不直接是 python 命令的命令都会引发错误的解释器错误
➜ pip
zsh: /usr/local/bin/pip: bad interpreter: /usr/local/opt/python/bin/python3.7: no such file or directory

➜ django-admin
zsh: /usr/local/bin/django-admin: bad interpreter: /usr/local/opt/python/bin/python3.7: no such file or directory
不完全确定原因是什么,所以我正在努力弄清楚如何解决它。但基本上我运行的任何涉及 python 包的命令都会抛出相同的错误

最佳答案

安装 pip这边走:
第一次下载get-pip :

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
然后安装 pip :
python3 get-pip.py
查询 pip安装:
$pip -V
pip 20.2.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)

关于python -/usr/local/bin/pip : bad interpreter:/usr/local/opt/python/bin/python3. 7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63089237/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com