/usr/bin/env: ‘python’: No such file or directory

解决报错/usr/bin/env: ‘python’: No such file or directory

一.启动某个程序报错

/usr/bin/env: ‘python’: No such file or directory

解决方法
1.查看python3的版本

python3 --version

2.查找python3的安装位置:

whereis python3

3.为其创建符号连接:

sudo ln -s /usr/bin/python3 /usr/bin/python

  4.尝试再次启动

Python 3.11.5 (v3.11.5:cce6ba91b3, Aug 24 2023, 10:50:31) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

你可能感兴趣的:(python,linux,开发语言)