Installing Python 3.12.2 on Parrot Linux

🐦 Welcome to this guide on installing the latest version of Python on Parrot Linux. If you’re looking to leverage the newest features of Python 3.12.2, follow these steps to get everything set up perfectly on your system.

πŸ“₯ Download and Prepare Python Installation

First, we need to download the Python package and prepare it for installation. Execute the following commands in your terminal:

wget https://www.python.org/ftp/python/3.12.3/Python-3.12.3.tgz
tar xzf Python-3.12.3.tgz
cd Python-3.12.3

πŸ› οΈ Install Dependencies and Update System

Before proceeding with the Python installation, make sure your system is up-to-date and has all necessary development tools:

sudo apt update && sudo apt upgrade -y
sudo apt install build-essential libssl-dev zlib1g-dev \
libncurses5-dev libncursesw5-dev libreadline-dev \
libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev \
libexpat1-dev liblzma-dev tk-dev libffi-dev -y

πŸ—οΈ Configure, Compile, and Install Python

Now, compile Python with optimizations and install it:

./configure --enable-optimizations
make -j$(nproc)
sudo make altinstall

πŸ”— Create Symbolic Links for Python and pip

To use Python 3.12.2 as the default Python version, create symbolic links and update your system’s PATH:

sudo ln -sf /usr/local/bin/python3.12 /usr/bin/python
sudo ln -sf /usr/local/bin/python3.12 /usr/bin/python3
sudo ln -sf /usr/local/bin/pip3.12 /usr/bin/pip
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

πŸ”„ Confirm the Python and pip Versions

Finally, verify that Python and pip are correctly installed by checking their versions:

python --version
python3 --version
pip --version
pip install tqdm

πŸŽ‰ Congratulations! You have successfully installed Python 3.12.2 on your Parrot Linux system. You’re now ready to dive into the world of Python programming with the latest tools at your disposal. Happy coding! πŸš€

Scroll to Top