﻿{"id":138,"date":"2019-11-15T20:26:50","date_gmt":"2019-11-15T12:26:50","guid":{"rendered":"http:\/\/www.linux-dba.com\/?p=138"},"modified":"2020-07-02T16:08:11","modified_gmt":"2020-07-02T08:08:11","slug":"centos7-7-%e4%b8%8b%e5%ae%89%e8%a3%85-python3-8-0","status":"publish","type":"post","link":"http:\/\/www.linux-dba.com\/index.php\/2019\/11\/138\/","title":{"rendered":"CentOS7.7 \u4e0b\u5b89\u88c5 python3.8.0"},"content":{"rendered":"<p>\u53c2\u8003\u7f51\u5740\uff1a<a href=\"https:\/\/www.cnblogs.com\/s-seven\/p\/9105973.html\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/www.cnblogs.com\/s-seven\/p\/9105973.html<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u4e00\u3001\u68c0\u67e5\u672c\u673a\u662f\u5426\u6709python3<\/p>\n<ol>\n<li>\n<blockquote><p>python #\u68c0\u67e5\u672c\u673a\u9ed8\u8ba4\u7248\u672c<\/p><\/blockquote>\n<\/li>\n<li>\n<blockquote><p>which python \uff03\u67e5\u770b\u672c\u673a\u9ed8\u8ba4\u7248\u672c\u4f4d\u7f6e<\/p><\/blockquote>\n<\/li>\n<li>\n<blockquote><p>ll \/usr\/bin\/python* #\u67e5\u770b\u672c\u673a\/usr\/bin\/\u76ee\u5f55\u4e0b\u662f\u5426\u6709\u9700\u8981\u7684python\u7248\u672c<\/p><\/blockquote>\n<\/li>\n<\/ol>\n<p>\u4e8c\u3001\u5b89\u88c5\u4f9d\u8d56\u5305<\/p>\n<ol>\n<li>\n<blockquote><p>yum -y groupinstall &#8220;Development tools&#8221; #\u5b89\u88c5\u5f00\u53d1\u5de5\u5177\u7ec4<\/p><\/blockquote>\n<\/li>\n<li>\n<blockquote><p>yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel #\u5b89\u88c5\u4f9d\u8d56\u5305<\/p><\/blockquote>\n<\/li>\n<\/ol>\n<p>\u4e09\u3001\u4e0b\u8f7dpython-3.8.0\u5b89\u88c5\u5305\uff0c\u5e76\u89e3\u5305<\/p>\n<ol>\n<li>\n<blockquote><p>wget https:\/\/www.python.org\/ftp\/python\/3.8.0\/Python-3.8.0.tar.xz #\u6b64\u6b65\u9aa4\u56e0\u4ece\u56fd\u5916\u4e0b\u8f7d\uff0c\u6545\u65f6\u95f4\u8f83\u957f<\/p><\/blockquote>\n<\/li>\n<li>\n<blockquote><p>tar -xvf Python-3.8.0.tar.xz #\u89e3\u5305<\/p><\/blockquote>\n<\/li>\n<\/ol>\n<p>\u56db\u3001\u7f16\u8bd1\u3001\u5b89\u88c5<\/p>\n<ol>\n<li>\n<blockquote><p>cd Python-3.8.0 #\u8fdb\u5165\u76ee\u5f55<\/p><\/blockquote>\n<\/li>\n<li>\n<blockquote><p>.\/configure &#8211;prefix=\/usr\/local\/python38 #\u7f16\u8bd1<\/p><\/blockquote>\n<\/li>\n<li>\n<blockquote><p>make&amp;&amp;make install<\/p><\/blockquote>\n<\/li>\n<\/ol>\n<p>\u4e94\u3001\u521b\u5efa\u94fe\u63a5\u5230\/usr\/bin\u76ee\u5f55<\/p>\n<blockquote>\n<ol>\n<li>ln -s \/usr\/local\/python38\/bin\/python3 \/usr\/bin\/python3 #\u521b\u5efa\u8f6f\u94fe\u63a5<\/li>\n<li>ln -s \/usr\/local\/python38\/bin\/pip3 \/usr\/bin\/pip3 # \u521b\u5efa\u8f6f\u94fe\u63a5<\/li>\n<\/ol>\n<\/blockquote>\n<p>\u516d\u3001\u6d4b\u8bd5<\/p>\n<ol>\n<li>\n<blockquote><p>python3<\/p><\/blockquote>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u9a8c\u8bc1\u73af\u5883\uff1aCentOS7.7<\/p>\n<p>\u9a8c\u8bc1\u65f6\u95f4\uff1a2019-11-15 20:21:00<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: right;\">\u65f6\u95f4\uff1a2019-11-15 20:23:00<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u8003\u7f51\u5740\uff1ahttps:\/\/www.cnblogs.com\/s-seven\/p\/9105973.html &#038;nb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[36,35,38],"tags":[3,12,21,6],"_links":{"self":[{"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/posts\/138"}],"collection":[{"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/comments?post=138"}],"version-history":[{"count":1,"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/posts\/138\/revisions"}],"predecessor-version":[{"id":286,"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/posts\/138\/revisions\/286"}],"wp:attachment":[{"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/media?parent=138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/categories?post=138"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.linux-dba.com\/index.php\/wp-json\/wp\/v2\/tags?post=138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}