{"id":11504,"date":"2021-12-20T16:09:48","date_gmt":"2021-12-20T21:09:48","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=11504"},"modified":"2022-02-02T17:43:23","modified_gmt":"2022-02-02T22:43:23","slug":"install-python-3-10-on-ubuntu","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/","title":{"rendered":"How To Install Python 3.10 on Ubuntu 20.04 and Debian-Based Systems"},"content":{"rendered":"\n

By the end of this guide, you will be able to install Python 3.10 on Ubuntu and Debian-based Linux systems such as LinuxMint and more.<\/p>\n\n\n\n

The motivation for this is that most of the Debian-based Linux<\/a> distributions include older versions of Python<\/a> in the official software repositories. Worse still, the Debian<\/a> packages are not available for all distributions.<\/p>\n\n\n\n

Note<\/strong>: If you are a user of CentOS 7 or CentOS 8 Linux systems then we have a similar tutorial for you<\/a> otherwise, you can proceed with this tutorial.<\/p>\n\n\n\n

Prepare the System<\/h2>\n\n\n\n

Log in to your Debian-based system with sudo privileged account access. Open the terminal and execute the commands below to update packages.<\/p>\n\n\n\n

$ sudo apt update && sudo apt upgrade<\/code><\/pre>\n\n\n\n

Next, install the required prerequisite packages for the compilation of the Python source code.<\/p>\n\n\n\n

$ sudo apt install wget build-essential libreadline-gplv2-dev libncursesw5-dev \\\ntk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev libssl-dev libsqlite3-dev zlib1g-dev<\/code><\/pre>\n\n\n\n

Download and Install Python 3.10 Source<\/h2>\n\n\n\n

Visit the official Python site and download the latest stable release source package (Python 3.10.1)<\/p>\n\n\n\n

$ wget https:\/\/www.python.org\/ftp\/python\/3.10.1\/Python-3.10.1.tgz<\/code><\/pre>\n\n\n\n

Next, extract the archive file on your system<\/p>\n\n\n\n

$ tar xzf Python-3.10.1.tgz<\/code><\/pre>\n\n\n\n

Enter into the extracted directory with cd<\/code> command, then configure the Python source code before compiling it on your system.<\/p>\n\n\n\n

$ cd Python-3.10.1\n$ .\/configure --enable-optimizations<\/code><\/pre>\n\n\n\n

Finally, run the make command to compile and install Python 3.10 on Ubuntu or any other Debian-based system. The altinstall<\/code> use here prevents the compiler from overriding the default Python versions.<\/p>\n\n\n\n

$ make altinstall<\/code><\/pre>\n\n\n\n

Confirm and Check Python Version<\/h2>\n\n\n\n

If the above make command runs without errors (normally it does) then it means you have successfully installed Python 3.10 on your Linux system. You can confirm the installation by checking the Python version using this command<\/p>\n\n\n\n

$ python3.10 -V\n\nPython 3.10.1<\/code><\/pre>\n\n\n\n

You can check pip for the Python version using the following command<\/p>\n\n\n\n

$ pip3.10 -V\n\npip 21.2.3 from \/usr\/local\/lib\/python3.10\/site-packages\/pip (python 3.10)<\/code><\/pre>\n\n\n\n

That’s It<\/h2>\n\n\n\n

In this micro tutorial, you learned how to compile and install Python 3.10 on Ubuntu, Debian, and LinuxMint systems using source code. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"

By the end of this guide, you will be able to install Python 3.10 on Ubuntu and Debian-based Linux systems such as LinuxMint and more. The motivation for this is…<\/p>\n","protected":false},"author":1,"featured_media":11506,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,23,25,27,16,18],"tags":[183,350,354,424,449,471,475,544,545,591,598],"yoast_head":"\nHow To Install Python 3.10 on Ubuntu 20.04 and Debian-Based Systems<\/title>\n<meta name=\"description\" content=\"This tutorial shows you how to install Python 3.10 on Ubuntu, LinuxMint, and other Debian-based Linux systems using the source code\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/\" \/>\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.10 on Ubuntu 20.04 and Debian-Based Systems\" \/>\n<meta property=\"og:description\" content=\"This tutorial shows you how to install Python 3.10 on Ubuntu, LinuxMint, and other Debian-based Linux systems using the source code\" \/>\n<meta property=\"og:url\" content=\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"Brightwhiz.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/brightwhiz\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-20T21:09:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-02T22:43:23+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/12\/install-python-3.10-on-ubuntu.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Michael Bright\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@brightwhizmag\" \/>\n<meta name=\"twitter:site\" content=\"@brightwhizmag\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Bright\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/\"},\"author\":{\"name\":\"Michael Bright\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32\"},\"headline\":\"How To Install Python 3.10 on Ubuntu 20.04 and Debian-Based Systems\",\"datePublished\":\"2021-12-20T21:09:48+00:00\",\"dateModified\":\"2022-02-02T22:43:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/\"},\"wordCount\":286,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/local.brightwhiz\/#organization\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/12\/install-python-3.10-on-ubuntu.jpg\",\"keywords\":[\"Debian\",\"Libraries\",\"Linux\",\"Open Source\",\"Performance\",\"Programming\",\"Python\",\"Software development\",\"Software Engineering\",\"Tools\",\"Ubuntu\"],\"articleSection\":[\"Articles\",\"Guides\",\"Libraries\",\"Programming\",\"Technology\",\"Tools\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/\",\"url\":\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/\",\"name\":\"How To Install Python 3.10 on Ubuntu 20.04 and Debian-Based Systems\",\"isPartOf\":{\"@id\":\"http:\/\/local.brightwhiz\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#primaryimage\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/12\/install-python-3.10-on-ubuntu.jpg\",\"datePublished\":\"2021-12-20T21:09:48+00:00\",\"dateModified\":\"2022-02-02T22:43:23+00:00\",\"description\":\"This tutorial shows you how to install Python 3.10 on Ubuntu, LinuxMint, and other Debian-based Linux systems using the source code\",\"breadcrumb\":{\"@id\":\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#primaryimage\",\"url\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/12\/install-python-3.10-on-ubuntu.jpg\",\"contentUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/12\/install-python-3.10-on-ubuntu.jpg\",\"width\":1280,\"height\":680,\"caption\":\"Install Python 3.10 on Ubuntu 20.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/local.brightwhiz\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Install Python 3.10 on Ubuntu 20.04 and Debian-Based Systems\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/local.brightwhiz\/#website\",\"url\":\"http:\/\/local.brightwhiz\/\",\"name\":\"Brightwhiz.com\",\"description\":\"Best Tech guides, Tutorials, and News\",\"publisher\":{\"@id\":\"http:\/\/local.brightwhiz\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/local.brightwhiz\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/local.brightwhiz\/#organization\",\"name\":\"Brightwhiz\",\"url\":\"http:\/\/local.brightwhiz\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png\",\"contentUrl\":\"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png\",\"width\":706,\"height\":135,\"caption\":\"Brightwhiz\"},\"image\":{\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/brightwhiz\/\",\"https:\/\/x.com\/brightwhizmag\",\"https:\/\/instagram.com\/bright_whiz\/\",\"https:\/\/www.pinterest.com\/sobbayi\/\",\"https:\/\/www.youtube.com\/channel\/UC6sCdP_d_RiTIM7ErFT-PSQ\"]},{\"@type\":\"Person\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32\",\"name\":\"Michael Bright\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/local.brightwhiz\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g\",\"caption\":\"Michael Bright\"},\"sameAs\":[\"https:\/\/sobbayi.com\"],\"url\":\"http:\/\/local.brightwhiz\/author\/sobbayiadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Install Python 3.10 on Ubuntu 20.04 and Debian-Based Systems","description":"This tutorial shows you how to install Python 3.10 on Ubuntu, LinuxMint, and other Debian-based Linux systems using the source code","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":"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/","og_locale":"en_US","og_type":"article","og_title":"How To Install Python 3.10 on Ubuntu 20.04 and Debian-Based Systems","og_description":"This tutorial shows you how to install Python 3.10 on Ubuntu, LinuxMint, and other Debian-based Linux systems using the source code","og_url":"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/","og_site_name":"Brightwhiz.com","article_publisher":"https:\/\/www.facebook.com\/brightwhiz\/","article_published_time":"2021-12-20T21:09:48+00:00","article_modified_time":"2022-02-02T22:43:23+00:00","og_image":[{"width":1280,"height":680,"url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/12\/install-python-3.10-on-ubuntu.jpg","type":"image\/jpeg"}],"author":"Michael Bright","twitter_card":"summary_large_image","twitter_creator":"@brightwhizmag","twitter_site":"@brightwhizmag","twitter_misc":{"Written by":"Michael Bright","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#article","isPartOf":{"@id":"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/"},"author":{"name":"Michael Bright","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32"},"headline":"How To Install Python 3.10 on Ubuntu 20.04 and Debian-Based Systems","datePublished":"2021-12-20T21:09:48+00:00","dateModified":"2022-02-02T22:43:23+00:00","mainEntityOfPage":{"@id":"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/"},"wordCount":286,"commentCount":0,"publisher":{"@id":"http:\/\/local.brightwhiz\/#organization"},"image":{"@id":"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#primaryimage"},"thumbnailUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/12\/install-python-3.10-on-ubuntu.jpg","keywords":["Debian","Libraries","Linux","Open Source","Performance","Programming","Python","Software development","Software Engineering","Tools","Ubuntu"],"articleSection":["Articles","Guides","Libraries","Programming","Technology","Tools"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#respond"]}]},{"@type":"WebPage","@id":"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/","url":"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/","name":"How To Install Python 3.10 on Ubuntu 20.04 and Debian-Based Systems","isPartOf":{"@id":"http:\/\/local.brightwhiz\/#website"},"primaryImageOfPage":{"@id":"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#primaryimage"},"image":{"@id":"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#primaryimage"},"thumbnailUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/12\/install-python-3.10-on-ubuntu.jpg","datePublished":"2021-12-20T21:09:48+00:00","dateModified":"2022-02-02T22:43:23+00:00","description":"This tutorial shows you how to install Python 3.10 on Ubuntu, LinuxMint, and other Debian-based Linux systems using the source code","breadcrumb":{"@id":"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#primaryimage","url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/12\/install-python-3.10-on-ubuntu.jpg","contentUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/12\/install-python-3.10-on-ubuntu.jpg","width":1280,"height":680,"caption":"Install Python 3.10 on Ubuntu 20.04"},{"@type":"BreadcrumbList","@id":"http:\/\/local.brightwhiz\/install-python-3-10-on-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/local.brightwhiz\/"},{"@type":"ListItem","position":2,"name":"How To Install Python 3.10 on Ubuntu 20.04 and Debian-Based Systems"}]},{"@type":"WebSite","@id":"http:\/\/local.brightwhiz\/#website","url":"http:\/\/local.brightwhiz\/","name":"Brightwhiz.com","description":"Best Tech guides, Tutorials, and News","publisher":{"@id":"http:\/\/local.brightwhiz\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/local.brightwhiz\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/local.brightwhiz\/#organization","name":"Brightwhiz","url":"http:\/\/local.brightwhiz\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/","url":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png","contentUrl":"http:\/\/local.brightwhiz\/wp-content\/uploads\/2021\/11\/brightwhiz-com-logo-orange.png","width":706,"height":135,"caption":"Brightwhiz"},"image":{"@id":"http:\/\/local.brightwhiz\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/brightwhiz\/","https:\/\/x.com\/brightwhizmag","https:\/\/instagram.com\/bright_whiz\/","https:\/\/www.pinterest.com\/sobbayi\/","https:\/\/www.youtube.com\/channel\/UC6sCdP_d_RiTIM7ErFT-PSQ"]},{"@type":"Person","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/81f0f3126f13834ae2e7f381b3028e32","name":"Michael Bright","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/local.brightwhiz\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/da90485875ff0aafa38fdd494abe87d1?s=96&d=mm&r=g","caption":"Michael Bright"},"sameAs":["https:\/\/sobbayi.com"],"url":"http:\/\/local.brightwhiz\/author\/sobbayiadmin\/"}]}},"_links":{"self":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts\/11504"}],"collection":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/comments?post=11504"}],"version-history":[{"count":0,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/posts\/11504\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/media\/11506"}],"wp:attachment":[{"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/media?parent=11504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/categories?post=11504"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/local.brightwhiz\/wp-json\/wp\/v2\/tags?post=11504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}