Linux CentOS安装zsh插件提示/usr/bin/env: python: No such file or directory。
程序员文章站
2022-03-08 19:27:33
...
执行 ./install.py
文件时,提示:
/usr/bin/env: python: No such file or directory
查看系统已安装的 python 版本:
➜ ~ ls -l /usr/bin | grep python
lrwxrwxrwx 1 root root 36 11月 2 18:11 python -> /etc/alternatives/unversioned-python
lrwxrwxrwx 1 root root 25 11月 2 18:08 python3 -> /etc/alternatives/python3
lrwxrwxrwx 1 root root 31 11月 21 2019 python3.6 -> /usr/libexec/platform-python3.6
lrwxrwxrwx 1 root root 17 11月 21 2019 python3.6-config -> python3.6m-config
lrwxrwxrwx 1 root root 32 11月 21 2019 python3.6m -> /usr/libexec/platform-python3.6m
lrwxrwxrwx 1 root root 39 11月 21 2019 python3.6m-config -> /usr/libexec/platform-python3.6m-config
lrwxrwxrwx 1 root root 46 11月 21 2019 python3.6m-x86_64-config -> /usr/libexec/platform-python3.6m-x86_64-config
lrwxrwxrwx 1 root root 32 11月 2 18:08 python3-config -> /etc/alternatives/python3-config
lrwxrwxrwx 1 root root 24 11月 2 18:11 unversioned-python -> /etc/alternatives/python
设置系统默认 python 版本为 python3:
alternatives --set python /usr/bin/python3
python
环境安装完毕,可以执行 ./install.py
了。