(非arm架构内核的操作系统)查看 python -V 报错 -bash: /usr/bin/python: No such file or directory

清除历史python之后,指向我安装的版本3.8.2之后,查看python版本,报错

 python -V

一直报错:

报错信息:-bash: /usr/bin/python: No such file or directory

进到 cd /usr/bin 目录下,看下指向是没问题

才发现,其实whereis python已经列出来了版本及对应目录

重新清除python软链

rm -rf /usr/bin/python

重新指向软链(注意这里是/usr/local/bin目录,不是/usr/bin,不要搞混了)

ln -s /usr/local/bin/python3.8 /usr/bin/python   #这里要注意,不要用成了ln -s /usr/bin/python3.8 /usr/bin/python

猜你喜欢

转载自blog.csdn.net/qq_42000661/article/details/114106069
今日推荐