linux and python - zamaniamin/python GitHub Wiki

Install Python

Update the package list

sudo apt-get update

Install Python 3

sudo apt-get install python3

or install a specific Python version, e.g., Python 3.11

sudo apt-get install python3.11

Install the python3-venv package

sudo apt-get install python3-venv

Verify the installations

python3.11 --version

Create a symbolic link to change the command name

sudo ln -s /usr/bin/<python3.11> /usr/local/bin/python

Note: Changing the default Python command can lead to compatibility issues with some scripts or programs that rely on specific Python versions. Use this with caution and ensure that your system and applications are compatible with the desired Python version.

Install pip

sudo apt-get install python3-pip

Verify the installation

pip3 --version

List installed packages on Debian

dpkg --list
⚠️ **GitHub.com Fallback** ⚠️