![]() However, this is not the latest python version. ![]() This is the current stable release of Python that takes over from Python 3.9. sudo apt install build-essential libssl-dev libffi-dev python3-dev Add deadsnakes PPA for the latest version of python For example, to install pandas which is a Python library used for data analysis and machine learning, run the following command: pip3 install pandasĪlso, consider installing the following development tools for a robust setup of your environment. In this case, package_name refers to any python library or package. To install a Python package, use the syntax: pip3 install package_name Pip 22.0.2 from /usr/lib/python3/dist-packages/pip (python 3.10) The output below confirms that pip3 is installed. To check the version of pip3 that is installed on the Ubuntu system, run the command: pip3 -version To install pip on Ubuntu type: sudo apt install python3-pip You can easily install it from the apt repository using the APT package manager. We will use this to install Python packages in our python projects. This is the defacto and recommended package manager for Python. Management of Python packages is handled by PIP. With that out of the way, let's focus on managing Python Packages. python3 -VĪs of writing this guide Python 3.10.4 which is the default version that ships with Ubuntu 22.04. When the upgrade of the packages is complete, be sure to confirm the version of python installed on your system. To upgrade the packages, run the command: sudo apt upgrade If you recently upgraded all the packages, this is not necessarily required. To list all packages with pending upgrades, run the following command: sudo apt -list upgradable Next, upgrade all the installed packages on your system including security updates. sudo apt-get install software-properties-common Next, install the software-properties-common package. So update Ubuntu as follows: sudo apt update To set up Python3, it's prudent to, first and foremost, ensure that the local package index is up to date. The base installation of almost all Linux distributions now comes with Python preinstalled. Ubuntu 20.04 and later versions of Ubuntu systems such as Ubuntu 22.04 come with Python3 already preinstalled.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |