{"id":167237,"date":"2023-09-12T23:47:00","date_gmt":"2023-09-12T15:47:00","guid":{"rendered":"http:\/\/www.idc.net\/help\/?p=167237"},"modified":"2023-09-12T23:47:00","modified_gmt":"2023-09-12T15:47:00","slug":"%e5%ae%89%e8%a3%85python3-%e4%b9%8b%e5%90%8e%e8%bf%90%e8%a1%8c%e4%b8%8d%e4%ba%86%e5%ae%9d%e5%a1%94%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/167237\/","title":{"rendered":"\u5b89\u88c5python3 \u4e4b\u540e\u8fd0\u884c\u4e0d\u4e86\u5b9d\u5854\u7684\u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"<div class=\"news-info\">\n<p><strong>\u5b89\u88c5python3 \u4e4b\u540e\u8fd0\u884c\u4e0d\u4e86\u5b9d\u5854\u7684\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<p>\u5b89\u88c5python3 \u4e4b\u540e\u8fd0\u884c\u4e0d\u4e86\u5b9d\u5854\u7684\u89e3\u51b3\u65b9\u6cd5<br \/>\n\u9996\u5148\u5462\uff0c\u597d\u591a\u8bba\u575b\u7684\u670b\u53cb\u8bf4\u81ea\u5df1\u7684linux\u7cfb\u7edf\u9700\u8981\u5b89\u88c5python3 \uff0c\u90a3\u4e48\u5c0f\u5f3a\u5728\u8fd9\u91cc\u6559\u5927\u5bb6\u4e00\u4e2a\u65e2\u53ef\u4ee5python3 \u548cpython2 \u4e00\u8d77\u7684\u5b89\u88c5\u73af\u5883<br \/>\n\u672c\u6765\u60f3\u51fa\u4e00\u4e2a\u811a\u672c\u7684\uff0c\u4f46\u662f\u60f3\u7740\u8981\u652f\u6301\u90a3\u4e48\u591a\u7248\u672c\u7684\u65b9\u5f0f\uff0c\u6211\u5c31\u6709\u70b9\u614c\u4e86\u3002<br \/>\n\u90a3\u4e48\u5148\u5b89\u88c5\u4e00\u4e2apython3 \u5427\uff0c\u6211\u7684\u73af\u5883\u662fCentos7.4 64 \u4f4d\u00a0\u00a0\u4e0b\u6b21\u51fa\u4e00\u4e2a\u4e4c\u73ed\u56fe\u7684\u5427\uff0c\u53cd\u6b63\u90fd\u5dee\u4e0d\u591a \u6682\u65f6\u73b0\u5728\u53ea\u652f\u6301Centos<\/p>\n<p>\u5b89\u88c5\u5b8c\u5b9d\u5854\u4e4b\u540egcc make \u73af\u5883\u662f\u5df2\u7ecf\u5b89\u88c5\u597d\u7684\u3002\u8fd9\u91cc\u4e0d\u591a\u505a\u4ecb\u7ecd\u4e86\u3002\u5c31\u76f4\u63a5\u8fdb\u5165\u6b63\u9898\u5427<br \/>\n1.\u4e0b\u8f7dpython \u5b89\u88c5\u5305<\/p>\n<div class=\"blockcode\">\n<div id=\"code_lkD\">\n<ol>\n<li>wget https:\/\/www.python.org\/ftp\/python\/3.6.0\/Python-3.6.0.tgz<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<p>2.\u89e3\u538b<\/p>\n<div class=\"blockcode\">\n<div id=\"code_dId\">\n<ol>\n<li>\u00a0\u00a0tar -xzvf Python-3.6.0.tgz<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<div align=\"left\">3\u3001\u8fdb\u5165\u89e3\u538b\u597d\u7684\u5b89\u88c5\u5305\u8def\u5f84\uff1a<\/div>\n<div class=\"blockcode\">\n<div id=\"code_e4L\">\n<ol>\n<li>\u00a0\u00a0cd Python-3.6.0<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<div align=\"left\">4\u3001\u7f16\u8bd1\u5b89\u88c5\u5305\uff0c\u6307\u5b9a\u5b89\u88c5\u8def\u5f84\uff0c\u5e76\u6267\u884c\u5b89\u88c5\u547d\u4ee4\uff1a<br \/>\n\u6ce8\u610f\uff1aprefix\u53c2\u6570\u7528\u4e8e\u6307\u5b9a\u5c06Python\u5b89\u88c5\u5728\u65b0\u76ee\u5f55\uff0c\u9632\u6b62\u8986\u76d6\u7cfb\u7edf\u9ed8\u8ba4\u5b89\u88c5\u7684python<\/div>\n<div class=\"blockcode\">\n<div id=\"code_MkE\">\n<ol>\n<li>.\/configure --prefix=\/usr\/local\/python36<\/li>\n<li>make &amp;&amp; make install<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<div align=\"left\">5.\u5efa\u7acb\u8f6f\u94fe\u63a5\uff08python3\u7684\u73af\u5883\u53d8\u91cf\uff09<\/div>\n<div class=\"blockcode\">\n<div id=\"code_b66\">\n<ol>\n<li>ln -s \/usr\/local\/python36\/bin\/python3.6 \/usr\/bin\/python3<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<div align=\"left\">\u76f4\u63a5\u8fd0\u884cpython3 \u5c31\u53ef\u4ee5\u7528python3\u4e86<\/div>\n<div class=\"blockcode\">\n<div id=\"code_XkI\">\n<ol>\n<li>[root@Rserver-1 Python-3.6.0]# python3<\/li>\n<li>Python 3.6.0 (default, May 25 2017, 11:39:00)<\/li>\n<li>[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux<\/li>\n<li>Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.<\/li>\n<li>&gt;&gt;&gt;<\/li>\n<li>&gt;&gt;&gt;<\/li>\n<li>&gt;&gt;&gt;<\/li>\n<li>&gt;&gt;&gt;<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<div align=\"left\">\u5982\u679c\u4f60\u65e0\u610f\u4e2d\u628apython3 \u8bbe\u7f6e\u4e3a\u9ed8\u8ba4\u7684py \u7684\u65f6\u5019\u89e3\u51b3\u65b9\u6cd5\u5982\u4e0b\uff1a<\/div>\n<div class=\"blockcode\">\n<div id=\"code_Cm2\">\n<ol>\n<li>wget http:\/\/103.224.251.67\/install\/ext\/python_check.sh &amp;&amp; sh python_check.sh<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"newscol-md-6 newscol-lg-4\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5python3 \u4e4b\u540e\u8fd0\u884c\u4e0d\u4e86\u5b9d\u5854\u7684\u89e3\u51b3\u65b9\u6cd5 \u5b89\u88c5python3 \u4e4b\u540e\u8fd0\u884c\u4e0d\u4e86\u5b9d\u5854\u7684\u89e3\u51b3\u65b9\u6cd5 \u9996\u5148\u5462\uff0c\u597d\u591a\u8bba [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[],"class_list":["post-167237","post","type-post","status-publish","format-standard","hentry","category-bt"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/167237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=167237"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/167237\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=167237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=167237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=167237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}