{"id":66,"date":"2021-02-12T13:42:04","date_gmt":"2021-02-12T13:42:04","guid":{"rendered":"https:\/\/www.jibsheet.net\/linux\/?p=66"},"modified":"2021-02-15T15:49:16","modified_gmt":"2021-02-15T15:49:16","slug":"installing-python3-on-amazon-linux2","status":"publish","type":"post","link":"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/","title":{"rendered":"Installing python3 on Amazon Linux2"},"content":{"rendered":"<p>Python3 isn&#8217;t installed by default &#8211; Python 2.7 is by default.<\/p>\n<pre>Use 'yum'.   apt-get was in the older version of Amazon Linux.<\/pre>\n<pre>[root@ip-x.y.z.12 ec2-user]# sudo yum install python3\r\nLoaded plugins: extras_suggestions, langpacks, priorities, update-motd\r\namzn2-core | 3.7 kB 00:00\r\nResolving Dependencies\r\n--&gt; Running transaction check\r\n---&gt; Package python3.x86_64 0:3.7.9-1.amzn2.0.1 will be installed\r\n--&gt; Processing Dependency: python3-libs(x86-64) = 3.7.9-1.amzn2.0.1 for package: python3-3.7.9-1.amzn2.0.1.x86_64\r\n--&gt; Processing Dependency: python3-setuptools for package: python3-3.7.9-1.amzn2.0.1.x86_64\r\n--&gt; Processing Dependency: python3-pip for package: python3-3.7.9-1.amzn2.0.1.x86_64\r\n--&gt; Processing Dependency: libpython3.7m.so.1.0()(64bit) for package: python3-3.7.9-1.amzn2.0.1.x86_64\r\n--&gt; Running transaction check\r\n---&gt; Package python3-libs.x86_64 0:3.7.9-1.amzn2.0.1 will be installed\r\n---&gt; Package python3-pip.noarch 0:9.0.3-1.amzn2.0.2 will be installed\r\n---&gt; Package python3-setuptools.noarch 0:38.4.0-3.amzn2.0.6 will be installed\r\n--&gt; Finished Dependency Resolution\r\n\r\nDependencies Resolved\r\n\r\n================================================================================\r\nPackage Arch Version Repository Size\r\n================================================================================\r\nInstalling:\r\npython3 x86_64 3.7.9-1.amzn2.0.1 amzn2-core 71 k\r\nInstalling for dependencies:\r\npython3-libs x86_64 3.7.9-1.amzn2.0.1 amzn2-core 9.2 M\r\npython3-pip noarch 9.0.3-1.amzn2.0.2 amzn2-core 1.9 M\r\npython3-setuptools noarch 38.4.0-3.amzn2.0.6 amzn2-core 617 k\r\n\r\nTransaction Summary\r\n================================================================================\r\nInstall 1 Package (+3 Dependent packages)\r\n\r\nTotal download size: 12 M\r\nInstalled size: 50 M\r\nIs this ok [y\/d\/N]: y\r\nDownloading packages:\r\n(1\/4): python3-3.7.9-1.amzn2.0.1.x86_64.rpm | 71 kB 00:00\r\n(2\/4): python3-pip-9.0.3-1.amzn2.0.2.noarch.rpm | 1.9 MB 00:00\r\n(3\/4): python3-setuptools-38.4.0-3.amzn2.0.6.noarch.rpm | 617 kB 00:00\r\n(4\/4): python3-libs-3.7.9-1.amzn2.0.1.x86_64.rpm | 9.2 MB 00:00\r\n--------------------------------------------------------------------------------\r\nTotal 22 MB\/s | 12 MB 00:00\r\nRunning transaction check\r\nRunning transaction test\r\nTransaction test succeeded\r\nRunning transaction\r\nInstalling : python3-pip-9.0.3-1.amzn2.0.2.noarch 1\/4\r\nInstalling : python3-libs-3.7.9-1.amzn2.0.1.x86_64 2\/4\r\nInstalling : python3-3.7.9-1.amzn2.0.1.x86_64 3\/4\r\nInstalling : python3-setuptools-38.4.0-3.amzn2.0.6.noarch 4\/4\r\nVerifying : python3-setuptools-38.4.0-3.amzn2.0.6.noarch 1\/4\r\nVerifying : python3-pip-9.0.3-1.amzn2.0.2.noarch 2\/4\r\nVerifying : python3-libs-3.7.9-1.amzn2.0.1.x86_64 3\/4\r\nVerifying : python3-3.7.9-1.amzn2.0.1.x86_64 4\/4\r\n\r\nInstalled:\r\npython3.x86_64 0:3.7.9-1.amzn2.0.1\r\n\r\nDependency Installed:\r\npython3-libs.x86_64 0:3.7.9-1.amzn2.0.1\r\npython3-pip.noarch 0:9.0.3-1.amzn2.0.2\r\npython3-setuptools.noarch 0:38.4.0-3.amzn2.0.6\r\n\r\nComplete!\r\n[root@ip-x.y.z-123 ec2-user]# python3\r\nPython 3.7.9 (default, Aug 27 2020, 21:59:41)\r\n[GCC 7.3.1 20180712 (Red Hat 7.3.1-9)] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n&gt;&gt;&gt; quit()\r\n[root@ip-x.y.z.123 ec2-user]# python\r\nPython 2.7.18 (default, Aug 27 2020, 21:22:52)\r\n[GCC 7.3.1 20180712 (Red Hat 7.3.1-9)] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n&gt;&gt;&gt; quit()\r\n[root@ip-x.y.z-123 ec2-user]# pip3\r\n\r\nUsage:\r\npip &lt;command&gt; [options]<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python3 isn&#8217;t installed by default &#8211; Python 2.7 is by default. Use &#8216;yum&#8217;. apt-get was in the older version of Amazon Linux. [root@ip-x.y.z.12 ec2-user]# sudo yum install python3 Loaded plugins: extras_suggestions, langpacks, priorities, update-motd amzn2-core | 3.7 kB 00:00 Resolving Dependencies &#8211;&gt; Running transaction check &#8212;&gt; Package python3.x86_64 0:3.7.9-1.amzn2.0.1 will be installed &#8211;&gt; Processing Dependency: python3-libs(x86-64) = 3.7.9-1.amzn2.0.1 for package: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8,7],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Installing python3 on Amazon Linux2 - Jon Allen&#039;s Linux Stuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Installing python3 on Amazon Linux2 - Jon Allen&#039;s Linux Stuff\" \/>\n<meta property=\"og:description\" content=\"Python3 isn&#8217;t installed by default &#8211; Python 2.7 is by default. Use &#039;yum&#039;. apt-get was in the older version of Amazon Linux. [root@ip-x.y.z.12 ec2-user]# sudo yum install python3 Loaded plugins: extras_suggestions, langpacks, priorities, update-motd amzn2-core | 3.7 kB 00:00 Resolving Dependencies --&gt; Running transaction check ---&gt; Package python3.x86_64 0:3.7.9-1.amzn2.0.1 will be installed --&gt; Processing Dependency: python3-libs(x86-64) = 3.7.9-1.amzn2.0.1 for package: [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/\" \/>\n<meta property=\"og:site_name\" content=\"Jon Allen&#039;s Linux Stuff\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-12T13:42:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-15T15:49:16+00:00\" \/>\n<meta name=\"author\" content=\"jonallen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"jonallen\" \/>\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\":\"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/\"},\"author\":{\"name\":\"jonallen\",\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993\"},\"headline\":\"Installing python3 on Amazon Linux2\",\"datePublished\":\"2021-02-12T13:42:04+00:00\",\"dateModified\":\"2021-02-15T15:49:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/\"},\"wordCount\":16,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993\"},\"articleSection\":[\"AWS\",\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/\",\"url\":\"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/\",\"name\":\"Installing python3 on Amazon Linux2 - Jon Allen&#039;s Linux Stuff\",\"isPartOf\":{\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#website\"},\"datePublished\":\"2021-02-12T13:42:04+00:00\",\"dateModified\":\"2021-02-15T15:49:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.jibsheet.net\/linux\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Installing python3 on Amazon Linux2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#website\",\"url\":\"https:\/\/www.jibsheet.net\/linux\/\",\"name\":\"Jon Allen's Linux Stuff\",\"description\":\"Howto&#039;s, Observations, and stuff\",\"publisher\":{\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.jibsheet.net\/linux\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993\",\"name\":\"jonallen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7d7c061ce9db8f5e4710555585475882?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7d7c061ce9db8f5e4710555585475882?s=96&d=mm&r=g\",\"caption\":\"jonallen\"},\"logo\":{\"@id\":\"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/www.jibsheet.net\/linux\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Installing python3 on Amazon Linux2 - Jon Allen&#039;s Linux Stuff","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:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/","og_locale":"en_US","og_type":"article","og_title":"Installing python3 on Amazon Linux2 - Jon Allen&#039;s Linux Stuff","og_description":"Python3 isn&#8217;t installed by default &#8211; Python 2.7 is by default. Use 'yum'. apt-get was in the older version of Amazon Linux. [root@ip-x.y.z.12 ec2-user]# sudo yum install python3 Loaded plugins: extras_suggestions, langpacks, priorities, update-motd amzn2-core | 3.7 kB 00:00 Resolving Dependencies --&gt; Running transaction check ---&gt; Package python3.x86_64 0:3.7.9-1.amzn2.0.1 will be installed --&gt; Processing Dependency: python3-libs(x86-64) = 3.7.9-1.amzn2.0.1 for package: [&hellip;]","og_url":"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/","og_site_name":"Jon Allen&#039;s Linux Stuff","article_published_time":"2021-02-12T13:42:04+00:00","article_modified_time":"2021-02-15T15:49:16+00:00","author":"jonallen","twitter_card":"summary_large_image","twitter_misc":{"Written by":"jonallen","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/#article","isPartOf":{"@id":"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/"},"author":{"name":"jonallen","@id":"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993"},"headline":"Installing python3 on Amazon Linux2","datePublished":"2021-02-12T13:42:04+00:00","dateModified":"2021-02-15T15:49:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/"},"wordCount":16,"commentCount":0,"publisher":{"@id":"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993"},"articleSection":["AWS","Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/","url":"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/","name":"Installing python3 on Amazon Linux2 - Jon Allen&#039;s Linux Stuff","isPartOf":{"@id":"https:\/\/www.jibsheet.net\/linux\/#website"},"datePublished":"2021-02-12T13:42:04+00:00","dateModified":"2021-02-15T15:49:16+00:00","breadcrumb":{"@id":"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.jibsheet.net\/linux\/index.php\/2021\/02\/12\/installing-python3-on-amazon-linux2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.jibsheet.net\/linux\/"},{"@type":"ListItem","position":2,"name":"Installing python3 on Amazon Linux2"}]},{"@type":"WebSite","@id":"https:\/\/www.jibsheet.net\/linux\/#website","url":"https:\/\/www.jibsheet.net\/linux\/","name":"Jon Allen's Linux Stuff","description":"Howto&#039;s, Observations, and stuff","publisher":{"@id":"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.jibsheet.net\/linux\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/295a80d0b2aa929b648c4fdddee83993","name":"jonallen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7d7c061ce9db8f5e4710555585475882?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7d7c061ce9db8f5e4710555585475882?s=96&d=mm&r=g","caption":"jonallen"},"logo":{"@id":"https:\/\/www.jibsheet.net\/linux\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/www.jibsheet.net\/linux"]}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/posts\/66"}],"collection":[{"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":4,"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/posts\/66\/revisions"}],"predecessor-version":[{"id":70,"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/posts\/66\/revisions\/70"}],"wp:attachment":[{"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/categories?post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jibsheet.net\/linux\/index.php\/wp-json\/wp\/v2\/tags?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}