{"id":15794,"date":"2025-12-06T06:15:54","date_gmt":"2025-12-06T06:15:54","guid":{"rendered":"https:\/\/greenwebpage.com\/community\/?p=15794"},"modified":"2025-12-06T06:15:57","modified_gmt":"2025-12-06T06:15:57","slug":"how-to-install-python-3-on-centos-10","status":"publish","type":"post","link":"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/","title":{"rendered":"How to Install Python 3 on CentOS 10"},"content":{"rendered":"\n<p>Python 3 is a widely used programming language for AI, DevOps, and application development. It also has a server-side scripting capability. CentOS 10 comes with Python as a standard for system tools. However, you may not have the latest Python 3 for modern development and applications. Installing Python 3 is easy on CentOS 10. You can use the default repositories or alternative repositories such as EPEL. Or you can compile from source.<\/p>\n\n\n\n<p>This guide explains all possible methods, each one step by step.<\/p>\n\n\n\n<p><strong>Table of Contents<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#How-to-Install-Python-3-on-CentOS-10\">How to Install Python 3 on CentOS 10 <\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#Method-1:-Install-Python-3-from-CentOS-10-Default-Repositories-(Recommended)\">Method 1: Install Python 3 from CentOS 10 Default Repositories (Recommended)<\/a><\/li>\n\n\n\n<li><a href=\"#Method-2:-Install-Python-3-from-EPEL-or-AppStream-Repository\">Method 2: Install Python 3 from EPEL or AppStream Repository<\/a><\/li>\n\n\n\n<li><a href=\"#Method-3:-Install-Python-3-by-Compiling-from-Source-(Latest-Version)\">Method 3: Install Python 3 by Compiling from Source (Latest Version)<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#How-to-Set-Python-3-as-Default-(Optional)\">How to Set Python 3 as Default (Optional)<\/a><\/li>\n\n\n\n<li><a href=\"#How-to-Uninstall-Python-3-from-CentOS-10\">How to Uninstall Python 3 from CentOS 10<\/a><\/li>\n\n\n\n<li><a href=\"#Conclusion\">Conclusion<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"How-to-Install-Python-3-on-CentOS-10\"><a id=\"post-15794-_kvrqtcrwmigc\"><\/a>How to Install Python 3 on CentOS 10<\/h2>\n\n\n\n<p>The easiest way to install Python 3 on CentOS 10 is to update your system with \u201csudo dnf update -y\u201d, then install Python and pip using \u201csudo dnf install python3 python3-pip -y\u201d, and verify the installation with \u201cpython3 &#8211;version\u201d; alternatively, you can enable newer Python versions through EPEL or AppStream modules, or compile the latest release from source if you need the most up-to-date version, making Python installation flexible depending on your requirements.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Method-1:-Install-Python-3-from-CentOS-10-Default-Repositories-(Recommended)\"><a id=\"post-15794-_krgohczkeek\"><\/a>Method 1: Install Python 3 from CentOS 10 Default Repositories (Recommended)<\/h2>\n\n\n\n<p>This is the most straightforward and stable method, which is ideal for most users.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_6zopzu4fn2iu\"><\/a>Step 1: Update System Packages<\/h3>\n\n\n\n<p>By updating, you will install the most recent packages.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf update<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"968\" height=\"323\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-1.png\" alt=\"sudo dnf update\" class=\"wp-image-15795\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-1.png 968w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-1-300x100.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-1-768x256.png 768w\" sizes=\"(max-width: 968px) 100vw, 968px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_fy8medvr2be0\"><\/a>Step 2: Install Python 3 and pip<\/h3>\n\n\n\n<p>Install Python 3 and Pip directly from the CentOS repository.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf install python3 python3-pip<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_5nt0uc6kc5zj\"><\/a>Step 3: Verify Installation<\/h3>\n\n\n\n<p>Checks that Python 3 and Pip are installed correctly.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>python3 &#8211;version<\/p>\n<p>pip3 &#8211;version<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Method-2:-Install-Python-3-from-EPEL-or-AppStream-Repository\"><a id=\"post-15794-_h7ejb5nde6vs\"><\/a>Method 2: Install Python 3 from EPEL or AppStream Repository<\/h2>\n\n\n\n<p>When newer versions of the software are available through EPEL\/AppStream modules.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_efwepy7b4n6o\"><\/a>Step 1: Install EPEL Repository<\/h3>\n\n\n\n<p>EPEL offers extra packages that are not included in base pricing.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf install epel-release<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_f8c5cbmbgi8j\"><\/a>Step 2: List Available Python Versions<\/h3>\n\n\n\n<p>Displays Python versions from AppStream or EPEL.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf list available | grep python3<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_y20w8uegapts\"><\/a>Step 3: Install Python 3<\/h3>\n\n\n\n<p>Installs the selected Python version.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf install python3 -y<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_4g8p6vmsc4ee\"><\/a>Step 4: Verify Installation<\/h3>\n\n\n\n<p>Checks that Python 3 and Pip are installed correctly.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>python3 &#8211;version<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Method-3:-Install-Python-3-by-Compiling-from-Source-(Latest-Version)\"><a id=\"post-15794-_duona54a76up\"><\/a>Method 3: Install Python 3 by Compiling from Source (Latest Version)<\/h2>\n\n\n\n<p>The latest Python releases are not available on repositories.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_72b4ad8vz8au\"><\/a>Step 1: Install Build Dependencies<\/h3>\n\n\n\n<p>Python source code is required for compilation.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf groupinstall &#8220;Development Tools&#8221;<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>Python source code is required for some dependencies:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf install openssl-devel bzip2-devel libffi-devel<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"970\" height=\"548\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-9.png\" alt=\"sudo dnf install openssl-devel bzip2-devel libffi-devel\" class=\"wp-image-15797\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-9.png 970w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-9-300x169.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-9-768x434.png 768w\" sizes=\"(max-width: 970px) 100vw, 970px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_kbe3tmjzc7d6\"><\/a>Step 2: Download the Latest Python Source Code<\/h3>\n\n\n\n<p>Get the latest stable Python version from python.org.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>curl -O https:\/\/www.python.org\/ftp\/python\/3.12.0\/Python-3.12.0.tgz<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"965\" height=\"207\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-10.png\" alt=\"curl -O https:\/\/www.python.org\/ftp\/python\/3.12.0\/Python-3.12.0.tgz\" class=\"wp-image-15798\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-10.png 965w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-10-300x64.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-10-768x165.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-10-960x207.png 960w\" sizes=\"(max-width: 965px) 100vw, 965px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_7x0cq3ry0d6x\"><\/a>Step 3: Extract the Tarball<\/h3>\n\n\n\n<p>Now, extract the Tarball as below:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>tar -xvf Python-3.12.0.tgz<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"970\" height=\"234\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-11.png\" alt=\"tar -xvf Python-3.12.0.tgz\" class=\"wp-image-15799\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-11.png 970w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-11-300x72.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-11-768x185.png 768w\" sizes=\"(max-width: 970px) 100vw, 970px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_c6jx5pj8snn8\"><\/a>Step 4: Configure the Build<\/h3>\n\n\n\n<p>Finally, optimizes compilation for your system:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>cd Python-3.12.0<\/p>\n<p>.\/configure &#8211;enable-optimizations<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"973\" height=\"348\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-12.png\" alt=\"Configure the build python3\" class=\"wp-image-15800\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-12.png 973w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-12-300x107.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-12-768x275.png 768w\" sizes=\"(max-width: 973px) 100vw, 973px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_7qjzyon5ypq5\"><\/a>Step 5: Build Python<\/h3>\n\n\n\n<p>This step compiles your source code (may require 5-10 minutes).<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>make -j 4<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"957\" height=\"311\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-13.png\" alt=\"make -j 4\" class=\"wp-image-15801\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-13.png 957w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-13-300x97.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-13-768x250.png 768w\" sizes=\"(max-width: 957px) 100vw, 957px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_c44lj0h6nxgu\"><\/a>Step 6: Install Python Safely<\/h3>\n\n\n\n<p>Altinstall is a good way to avoid reinstalling the Python system.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo make altinstall<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"973\" height=\"471\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-14.png\" alt=\"sudo make altinstall\" class=\"wp-image-15802\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-14.png 973w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-14-300x145.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-14-768x372.png 768w\" sizes=\"(max-width: 973px) 100vw, 973px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_x116uwk3pwv5\"><\/a>Step 7: Verify the Installed Version<\/h3>\n\n\n\n<p>Verify that the Version installed is correct<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>python3.12 &#8211;version<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"966\" height=\"106\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-15.png\" alt=\"python3.12 --version\" class=\"wp-image-15803\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-15.png 966w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-15-300x33.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-15-768x84.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-15-960x106.png 960w\" sizes=\"(max-width: 966px) 100vw, 966px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"How-to-Set-Python-3-as-Default-(Optional)\"><a id=\"post-15794-_dhixph5y4pi\"><\/a>How to Set Python 3 as Default (Optional)<\/h2>\n\n\n\n<p>Be cautious if you are using Python 2.x on your system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_dix3y3xhtw6t\"><\/a>Step 1: Check Available Python Versions<\/h3>\n\n\n\n<p>Check the Available Python Versions<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>ls \/usr\/bin\/python*<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"149\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-16.png\" alt=\"ls \/usr\/bin\/python*\" class=\"wp-image-15804\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-16.png 977w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-16-300x46.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-16-768x117.png 768w\" sizes=\"(max-width: 977px) 100vw, 977px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_sif7tz2ukrkd\"><\/a>Step 2: Update Alternatives<\/h3>\n\n\n\n<p>Now, update the alternative or choose the particular Python version:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo alternatives &#8211;set python \/usr\/bin\/python3<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<p>OR configure manually:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo alternatives &#8211;config python<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"966\" height=\"97\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-17.png\" alt=\"sudo alternatives --config python\" class=\"wp-image-15805\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-17.png 966w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-17-300x30.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-17-768x77.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-17-960x97.png 960w\" sizes=\"(max-width: 966px) 100vw, 966px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"How-to-Uninstall-Python-3-from-CentOS-10\"><a id=\"post-15794-_oj2xjnnsd60c\"><\/a>How to Uninstall Python 3 from CentOS 10<\/h2>\n\n\n\n<p>To uninstall the Python 3 version on CentOS 10, follow the methods below:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_eeab0mr6qe24\"><\/a>Uninstall repository-installed Python<\/h3>\n\n\n\n<p>Uninstall packages installed by the repository:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo dnf remove python3<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"974\" height=\"112\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-18.png\" alt=\"sudo dnf remove python3\" class=\"wp-image-15806\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-18.png 974w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-18-300x34.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-18-768x88.png 768w\" sizes=\"(max-width: 974px) 100vw, 974px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_corvlxx00no7\"><\/a>Uninstall pip-installed packages<\/h3>\n\n\n\n<p>Uninstall packages installed by pip:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>pip3 uninstall package-name<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><a id=\"post-15794-_2e1ifxyx75wl\"><\/a>Uninstall source-installed Python<\/h3>\n\n\n\n<p>Remove the installation directory:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\n<p>sudo rm -rf \/usr\/local\/bin\/python3.12<\/p>\n<p>sudo rm -rf \/usr\/local\/lib\/python3.12<\/p>\n<\/th><\/tr><\/thead><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"131\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-19.png\" alt=\"Uninstall source-installed Python\" class=\"wp-image-15807\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-19.png 969w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-19-300x41.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-19-768x104.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15794-19-960x131.png 960w\" sizes=\"(max-width: 969px) 100vw, 969px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>That is all from the installation of Python 3 on CentOS 10.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Conclusion\"><a id=\"post-15794-_k5elhda1scjm\"><\/a>Conclusion<\/h2>\n\n\n\n<p>Installing Python 3 is easy on CentOS 10. Update your system first with sudo update -y. Then install Python 3 and pip with sudo install python3 and python3 pip-y. Verify the installation using python3.<\/p>\n\n\n\n<p>You can install Python 3 on CentOS 10 in a few simple steps. The method you choose will depend on your needs. The default repository is the most stable and easiest method, while EPEL\/AppStream allows you to access newer versions. Compiling Python from source is best for users who need the latest release. Installing Python 3 on CentOS 10 will allow you to create applications, automate processes, and use the latest development tools.<\/p>\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>Python 3 is a widely used programming language for AI, DevOps, and application development. It also has a server-side scripting capability. CentOS 10 comes with Python as a standard for system tools. However, you may not have the latest Python 3 for modern development and applications. Installing Python 3 is easy on CentOS 10. You [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":15810,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[958,980,981,350],"class_list":["post-15794","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-centos-10","tag-python-3","tag-scripting","tag-web-development"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install Python 3 on CentOS 10 - Greenwebpage Community<\/title>\n<meta name=\"description\" content=\"Read this quick guide to learn to install Python 3 on CentOS 10. This guide explains all possible methods, each one step by step.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Python 3 on CentOS 10 - Greenwebpage Community\" \/>\n<meta property=\"og:description\" content=\"Read this quick guide to learn to install Python 3 on CentOS 10. This guide explains all possible methods, each one step by step.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/\" \/>\n<meta property=\"og:site_name\" content=\"Greenwebpage Community\" \/>\n<meta property=\"article:published_time\" content=\"2025-12-06T06:15:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-06T06:15:57+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Install-Python3-on-CentOS-10.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Karim Buzdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Karim Buzdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/\"},\"author\":{\"name\":\"Karim Buzdar\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\"},\"headline\":\"How to Install Python 3 on CentOS 10\",\"datePublished\":\"2025-12-06T06:15:54+00:00\",\"dateModified\":\"2025-12-06T06:15:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/\"},\"wordCount\":749,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Install-Python3-on-CentOS-10.jpg\",\"keywords\":[\"CentOS 10\",\"Python 3\",\"Scripting\",\"Web Development\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/\",\"name\":\"How to Install Python 3 on CentOS 10 - Greenwebpage Community\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Install-Python3-on-CentOS-10.jpg\",\"datePublished\":\"2025-12-06T06:15:54+00:00\",\"dateModified\":\"2025-12-06T06:15:57+00:00\",\"description\":\"Read this quick guide to learn to install Python 3 on CentOS 10. This guide explains all possible methods, each one step by step.\",\"breadcrumb\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#primaryimage\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Install-Python3-on-CentOS-10.jpg\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Install-Python3-on-CentOS-10.jpg\",\"width\":1020,\"height\":600,\"caption\":\"How to Install Python3 on CentOS 10\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/greenwebpage.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Python 3 on CentOS 10\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"name\":\"Greenwebpage Community\",\"description\":\"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.\",\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greenwebpage.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\",\"name\":\"Greenwebpage Community\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"width\":512,\"height\":512,\"caption\":\"Greenwebpage Community\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\",\"name\":\"Karim Buzdar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"caption\":\"Karim Buzdar\"},\"sameAs\":[\"https:\/\/greenwebpage.com\"],\"url\":\"https:\/\/greenwebpage.com\/community\/author\/karim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Python 3 on CentOS 10 - Greenwebpage Community","description":"Read this quick guide to learn to install Python 3 on CentOS 10. This guide explains all possible methods, each one step by step.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Python 3 on CentOS 10 - Greenwebpage Community","og_description":"Read this quick guide to learn to install Python 3 on CentOS 10. This guide explains all possible methods, each one step by step.","og_url":"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/","og_site_name":"Greenwebpage Community","article_published_time":"2025-12-06T06:15:54+00:00","article_modified_time":"2025-12-06T06:15:57+00:00","og_image":[{"width":1020,"height":600,"url":"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Install-Python3-on-CentOS-10.jpg","type":"image\/jpeg"}],"author":"Karim Buzdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Karim Buzdar","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#article","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/"},"author":{"name":"Karim Buzdar","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8"},"headline":"How to Install Python 3 on CentOS 10","datePublished":"2025-12-06T06:15:54+00:00","dateModified":"2025-12-06T06:15:57+00:00","mainEntityOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/"},"wordCount":749,"commentCount":0,"publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Install-Python3-on-CentOS-10.jpg","keywords":["CentOS 10","Python 3","Scripting","Web Development"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/","url":"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/","name":"How to Install Python 3 on CentOS 10 - Greenwebpage Community","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/#website"},"primaryImageOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#primaryimage"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Install-Python3-on-CentOS-10.jpg","datePublished":"2025-12-06T06:15:54+00:00","dateModified":"2025-12-06T06:15:57+00:00","description":"Read this quick guide to learn to install Python 3 on CentOS 10. This guide explains all possible methods, each one step by step.","breadcrumb":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#primaryimage","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Install-Python3-on-CentOS-10.jpg","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Install-Python3-on-CentOS-10.jpg","width":1020,"height":600,"caption":"How to Install Python3 on CentOS 10"},{"@type":"BreadcrumbList","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-python-3-on-centos-10\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/greenwebpage.com\/community\/"},{"@type":"ListItem","position":2,"name":"How to Install Python 3 on CentOS 10"}]},{"@type":"WebSite","@id":"https:\/\/greenwebpage.com\/community\/#website","url":"https:\/\/greenwebpage.com\/community\/","name":"Greenwebpage Community","description":"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.","publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greenwebpage.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/greenwebpage.com\/community\/#organization","name":"Greenwebpage Community","url":"https:\/\/greenwebpage.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","width":512,"height":512,"caption":"Greenwebpage Community"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8","name":"Karim Buzdar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","caption":"Karim Buzdar"},"sameAs":["https:\/\/greenwebpage.com"],"url":"https:\/\/greenwebpage.com\/community\/author\/karim\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/15794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/comments?post=15794"}],"version-history":[{"count":2,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/15794\/revisions"}],"predecessor-version":[{"id":15809,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/15794\/revisions\/15809"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media\/15810"}],"wp:attachment":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media?parent=15794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/categories?post=15794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/tags?post=15794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}