{"id":12984,"date":"2023-01-27T12:46:56","date_gmt":"2023-01-27T17:46:56","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=12984"},"modified":"2023-01-27T12:47:01","modified_gmt":"2023-01-27T17:47:01","slug":"how-to-install-python-3-11-on-centos-7-centos-8-linux-systems","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/how-to-install-python-3-11-on-centos-7-centos-8-linux-systems\/","title":{"rendered":"How To Install Python 3.11 on CentOS 7 | CentOS 8 Linux Systems"},"content":{"rendered":"\n
This is an update to a guide we released on how to install Python 3.10 on CentOS. This time around we will show you how to install Python 3.11 on CentOS 7 and CentOS 8 Linux<\/a> Systems.<\/p>\n\n\n\n This tutorial is for those who want the latest and greatest Python version seeing the default CentOS<\/a> repositories do not carry the latest version of Python<\/a>. So let’s get started.<\/p>\n\n\n\n While logged in as anon-root user with sudo privileges, open the terminal and execute the following commands to update the installed packages.<\/p>\n\n\n\n With our system up-to-date we can go ahead and install the software development dependencies required to build the Python 3.11 source code on CentOS 8 or CentOS 7:<\/p>\n\n\n\n We will be using wget<\/strong> to download the archive. In case you do not have it on your system you can run this command to get it installed:<\/p>\n\n\n\n Now we can use wget to download Python 3.11 Archive:<\/p>\n\n\n\n We will be using Python 3.11.1 in this tutorial but the steps should be the same for updated versions.<\/p>\n\n\n\n Extract the archive file using tar:<\/p>\n\n\n\n Now, switch to the directory created from the file extraction:<\/p>\n\n\n\n Run this command to configure the build parameters:<\/p>\n\n\n\n You can now build the Python 3.11 source using this command:<\/p>\n\n\n\n Once all the activity is complete successfully you can confirm the install using this command:<\/p>\n\n\n\n Bonus<\/strong>: Pip 3.11 will also be installed and you can run this command to confirm the pip installation:<\/p>\n\n\n\n You now have the latest version of Python 3.11 on CentOS 7 and CentOS 8. Remember if you follow the above tutorial be sure to substitute the commands using the latest version of Python from the source release page.<\/p>\n","protected":false},"excerpt":{"rendered":" This is an update to a guide we released on how to install Python 3.10 on CentOS. This time around we will show you how to install Python 3.11 on…<\/p>\n","protected":false},"author":1,"featured_media":12985,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,23,9,25,27,28,16,18],"tags":[121,350,354,424,433,471,472,475,544,591,638],"yoast_head":"\nStep 1: Update Your CentOS 7 or CentOS 8 System<\/h2>\n\n\n\n
$ sudo yum -y install epel-release\n$ sudo yum -y update<\/code><\/pre>\n\n\n\n
Step 2: Install Python Dependencies<\/h2>\n\n\n\n
$ sudo yum groupinstall "Development Tools" -y\n$ sudo yum install openssl-devel libffi-devel bzip2-devel -y<\/code><\/pre>\n\n\n\n
Step 3: Download latest Python 3.11 Source Archive<\/h2>\n\n\n\n
$ sudo yum install wget -y<\/code><\/pre>\n\n\n\n
$ wget https:\/\/www.python.org\/ftp\/python\/3.11.1\/Python-3.11.1.tgz<\/code><\/pre>\n\n\n\n
$ sudo tar xvf Python-3.11.1.tgz<\/code><\/pre>\n\n\n\n
$ cd Python-3.11.1<\/code><\/pre>\n\n\n\n
Step 4: Configure and Install Python 3.11 on CentOS 7 or 8<\/h2>\n\n\n\n
$ .\/configure --enable-optimizations<\/code><\/pre>\n\n\n\n
$ sudo make altinstall<\/code><\/pre>\n\n\n\n
$ python3.11 --version\nPython 3.11.1<\/code><\/pre>\n\n\n\n
$ pip3.11 --version\npip 22.3.1 from \/usr\/local\/lib\/python3.11\/site-packages\/pip (python 3.11)<\/code><\/pre>\n\n\n\n
In Closing<\/h2>\n\n\n\n