{"id":250,"date":"2024-03-23T05:38:40","date_gmt":"2024-03-22T21:38:40","guid":{"rendered":"https:\/\/669082.xyz\/?p=250"},"modified":"2024-03-23T05:48:49","modified_gmt":"2024-03-22T21:48:49","slug":"centos7%e5%8d%87%e7%ba%a7python3-9-1","status":"publish","type":"post","link":"https:\/\/669082.xyz\/index.php\/2024\/03\/23\/centos7%e5%8d%87%e7%ba%a7python3-9-1\/","title":{"rendered":"centos7\u5347\u7ea7python3.9.1"},"content":{"rendered":"<pre><code class=\"language-shell\">\u5b89\u88c5\u4f9d\u8d56\nyum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel psmisc libffi-devel\nyum install gcc-c++ -y\n\n#\u8fdb\u5165\u76ee\u5f55\ncd \/usr\/src\/\n\n#\u4e0b\u8f7d\u6e90\u7801 \u5e76\u89e3\u538b\nwget https:\/\/www.python.org\/ftp\/python\/3.9.11\/Python-3.9.11.tgz\ntar -xf Python-3.9.11.tgz\n\n#\u8fdb\u5165\u76ee\u5f55 \u7f16\u8bd1\u5b89\u88c5\ncd Python-3.9.11\n.\/configure prefix=\/usr\/local\/python3\nmake &amp;&amp; make install\n\n#\u5907\u4efd\u4e4b\u524d\u7684\u8f6f\u94fe\u63a5\n mv \/usr\/bin\/python \/usr\/bin\/python_old\n mv \/usr\/bin\/pip \/usr\/bin\/pip_old\n\n#\u521b\u5efa\u8f6f\u94fe\u63a5\nln -s \/usr\/local\/python3\/bin\/python3.9 \/usr\/bin\/python\nln -s \/usr\/local\/python3\/bin\/pip3.9 \/usr\/bin\/pip\n\n#\u4f46\u73b0\u5728yum\u4f1a\u51fa\u9519 \u9700\u8981\u4fee\u6539\u4e0b \u9700\u8981\u4fee\u6539\u4ee5\u4e0b3\u4e2a\u6587\u4ef6\nvi \/usr\/bin\/yum\n#!\/usr\/bin\/python2.7\n\nvi \/usr\/libexec\/urlgrabber-ext-down\n#!\/usr\/bin\/python2.7\n\nvi \/usr\/bin\/yum-config-manager\n#!\/usr\/bin\/python2.7<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5\u4f9d\u8d56 yum install openssl-devel bzip2-devel expat-d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,10],"tags":[],"class_list":["post-250","post","type-post","status-publish","format-standard","hentry","category-linux","category-python"],"_links":{"self":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts\/250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=250"}],"version-history":[{"count":2,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts\/250\/revisions"}],"predecessor-version":[{"id":252,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts\/250\/revisions\/252"}],"wp:attachment":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}