The following commands can be used to install Python 3.7, 3.8 or 3.9: sudo apt install -y python3.7 sudo apt install -y python3.8 sudo apt install -y python3. Deadsnakes repository provides older Python versions as well. Python 3.10 is installed on Ubuntu 22.04 by default. Remove GPG key and repository: sudo rm -rf /etc/apt//deadsnakes-ubuntu-ppa.gpg* sudo rm -rf /etc/apt//deadsnakes-ubuntu-ppa-jammy.list Install older versions You can remove them using the following command: sudo apt purge -autoremove -y mime-support bzip2 If you wish to completely remove Python 3.11, use the following command: sudo apt purge -autoremove -y python3.11ĭuring installation, additional packages were installed. Now test a program by running the python3.11 command: python3.11 main.py Uninstall Python Verify that the installation completed successfully by checking Python version: python3.11 -version Testing PythonĪdd the following code: print('Hello world') The command and package name vary: On Debian derivatives, such as Ubuntu, use APT. This is an alternative method of installing Python 3.11 on Ubuntu Linux system. If Python 2.7 or later isnt installed, install Python 3.7 using your distributions package manager. Once the PPA has been added, you can install Python 3.11 on Ubuntu using the commands: sudo apt install python3.11 Verify the installation: python3.11 -version Python 3.11.3 Method 2 Install Python 3.11 on Ubuntu from source. Install Python 3.11: sudo apt install -y python3.11 Use your package manager to install the developer package (typically named python-dev or python-devel ). Install PythonĪdd the Python repository: sudo add-apt-repository -y ppa:deadsnakes/ppa configure Now, to install Python 3. Alternative tutorial: How to install Python on CentOS. wget tar -xf Python-3.9.0.tar.xz Then cd to the extracted directory: cd Python-3.9.0 Now configure the script. Step-by-step, beginner-friendly instructions. This tutorial demonstrates how to install Python 3.11 on Ubuntu 22.04. In this tutorial, we’re going to show you how to install the latest version of Python on Ubuntu. Python is often used for machine learning, deep learning, computer vision, and data analysis. Python is a programming language that is used to implement various kinds of applications.
0 Comments
Leave a Reply. |