This is no surprise, as Python is a widely-used, high-level programming language used across various disciplines. Rahul is highly intrigued and wishes to start his Python journey immediately. Rahul recently read an article on " what is Python?" and came across all the amazing things he can create and achieve using Python. Follow the steps and start coding in no time! Introduction 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.In this article, you will learn all about starting your journey with this Python tutorial by installing and interacting with Python for Linux. 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')
Install Python 3.11: sudo apt install -y python3.11 Install PythonĪdd the Python repository: sudo add-apt-repository -y ppa:deadsnakes/ppa
This tutorial demonstrates how to install Python 3.11 on Ubuntu 22.04. 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.