How to solve the "-bash: python: command not found" error on Linux / Unix VPS

How to solve the "-bash: python: command not found" error on Linux / Unix VPS

Direct installation is suitable.

1. Under Ubuntu/Debian
apt-get install python
or
apt-get install python3

2. Oracle/RHEL (Red Hat)/CentOS
yum install python

3. Fedora
dnf install python
or
dnf install python3

4. Under Arch
pacman -S python2
or
pacman -S python3

5. Under Suse/OpenSUSE
zypper install python
or
zypper install python3

6. Install Python v2.x under FreeBSD:
pkg install python2
or
cd /usr/ports/lang/python2/ && make install clean

Install Python v3.x:
pkg install python3
or
cd /usr/ports/lang/python3/ && make install clean

7. OpenBSD
pkg_add python
or
doas pkg_add python

8. MacOS X
brew install python3

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

via: https://www.cyberciti.biz/faq/bash-python-command-not-found/

<<:  Optimizing OpenVZ VPS using BBR acceleration

>>:  Yiyun 512MB RAM Los Angeles KVM VPS Review

Recommend

HostDare: Los Angeles CN2 GIA KVM VPS, 30% off, minimum annual payment of $32

HostDare, which has been introduced many times in...

Maximumvps: $8.5/year/64MB memory/5GB space/56GB traffic/1 IP/KVM

Maximumvps started providing commercial services ...

Dynadot.com Hosting Introduction

Dynadot.com provides web hosting and domain regis...

AWS gives $100 (AiBa has successfully received it)

1. Go to https://aws.amazon.com/big-data/powerof6...

Simple tutorial on how to transfer GODADDY domain to DOMAIN.COM

This tutorial is not only applicable to transferr...

Hawkhost: vps 50% off softlayer Singapore

awkhost, a stable merchant with a data center in ...

IndoVirtue: $55/month/E3-1230v2/8GB RAM/2TB HDD/Unlimited traffic/Singapore

ndoVirtue, founded in late 2010, provides Singapo...