说明:有时候换系统尝试运行Python程序时,服务器会返回-bash: python: command not found错误指令,说明系统上未安装Python,这里说下方法。

方法

1、安装
Ubuntu/Debian系统:

apt-get install python
或者
apt-get install python3

CentOS系统:

yum install python

2、检查

type -a python
which python
ls -l /usr/bin/python
ls -l /usr/bin/python*

结果有python版本信息即安装成功!安装更多方法也可参考:Linux CentOS升级Python 3.6版本方法Linux CentOS 6升级Python 2.6至Python 2.7的方法

's

本文链接:https://www.wxiou.cn/archives/209/

最后修改:2017 年 07 月 14 日 09 : 04 PM

【腾讯云】星星海SA2云服务器618钜惠,1核2G 首年95元【点击查看】。


文章: 《Linux VPS出现 “-bash: python: command not found”错误的解决方法》
联系方式:
文章链接:https://wxiou.cn/index.php/archives/663/
除特别注明外,文章均为Literature原创,转载时请注明本文出处及文章链接
Last modification:April 20th, 2021 at 01:03 pm
如果觉得我的文章对你有用,请随意赞赏