Only the Ubuntu / Debian packages name the executable for Python 3
If you're compiling and installing from source, then the Python 3 executable should just be
What is the output of
python -V and
I've had great success with asdf to run newer versions of Python and Ruby.
I've added the instructions here to install Python 3.9.2 with asdf for the Bash shell.
Install dependencies for asdf.
sudo apt install curl git
Download the v0.8.0 branch with Git.
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.0
If you use Bash, then integrate asdf with your shell using the following.
echo ". $HOME/.asdf/asdf.sh" >> ~/.bashrc
Reload your shell configuration.
Add the Python plugin.
asdf plugin add python
Install the dependencies required to build Python.
sudo apt install make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils \
tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
Install the desired version of Python.
asdf install python 3.9.2
Set the global Python version for your user.
asdf global python 3.9.2