{"id":207,"date":"2018-04-18T09:59:16","date_gmt":"2018-04-18T01:59:16","guid":{"rendered":"http:\/\/www.kejidana.com\/?p=207"},"modified":"2018-04-18T09:59:16","modified_gmt":"2018-04-18T01:59:16","slug":"linux%e4%b8%8b%e5%ae%89%e8%a3%85python3-5-3","status":"publish","type":"post","link":"http:\/\/www.kejidana.com\/?p=207","title":{"rendered":"linux\u4e0b\u5b89\u88c5python3.5.3"},"content":{"rendered":"<p>\u5b89\u88c5python3.5\u53ef\u80fd\u4f7f\u7528\u7684\u4f9d\u8d56<\/p>\n<pre class=\"lang:default decode:true \">yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel<\/pre>\n<p>\u5230python\u5b98\u7f51\u627e\u5230\u4e0b\u8f7d\u8def\u5f84, \u7528wget\u4e0b\u8f7d<\/p>\n<pre class=\"lang:default decode:true \">wget https:\/\/www.python.org\/ftp\/python\/3.5.3\/Python-3.5.3.tgz<\/pre>\n<p>\u89e3\u538btgz\u5305<\/p>\n<pre class=\"prettyprint\" name=\"code\"><code class=\"hljs avrasm has-numbering\">tar -zxvf Python-<span class=\"hljs-number\">3.5<\/span><span class=\"hljs-number\">.3<\/span><span class=\"hljs-preprocessor\">.tgz<\/span><\/code><\/pre>\n<ul class=\"pre-numbering\">\n<li>1<\/li>\n<\/ul>\n<p>\u628apython\u79fb\u5230\/usr\/local\u4e0b\u9762<\/p>\n<pre class=\"prettyprint\" name=\"code\"><code class=\"hljs lua has-numbering\">mv Python-<span class=\"hljs-number\">3.5<\/span><span class=\"hljs-number\">.3<\/span> \/usr\/<span class=\"hljs-keyword\">local<\/span><\/code><\/pre>\n<ul class=\"pre-numbering\">\n<li>1<\/li>\n<\/ul>\n<p>\u5220\u9664\u65e7\u7248\u672c\u7684python\u4f9d\u8d56<\/p>\n<pre class=\"prettyprint\" name=\"code\"><code class=\"hljs 1c has-numbering\">ll \/usr\/bin <span class=\"hljs-string\">| grep python<\/span><\/code><\/pre>\n<ul class=\"pre-numbering\">\n<li>1<\/li>\n<\/ul>\n<pre class=\"prettyprint\" name=\"code\"><code class=\"hljs mel has-numbering\">rm -rf \/usr\/bin\/<span class=\"hljs-keyword\">python<\/span><\/code><\/pre>\n<ul class=\"pre-numbering\">\n<li>1<\/li>\n<\/ul>\n<p>\u8fdb\u5165python\u76ee\u5f55<\/p>\n<pre class=\"prettyprint\" name=\"code\"><code class=\"hljs bash has-numbering\"><span class=\"hljs-built_in\">cd<\/span> \/usr\/local\/Python-<span class=\"hljs-number\">3.5<\/span>.<span class=\"hljs-number\">3<\/span>\/<\/code><\/pre>\n<ul class=\"pre-numbering\">\n<li>1<\/li>\n<\/ul>\n<p>\u914d\u7f6e<\/p>\n<pre class=\"prettyprint\" name=\"code\"><code class=\"hljs  has-numbering\">.\/configure<\/code><\/pre>\n<ul class=\"pre-numbering\">\n<li>1<\/li>\n<\/ul>\n<p>\u7f16\u8bd1 make<\/p>\n<pre class=\"prettyprint\" name=\"code\"><code class=\"hljs go has-numbering\"><span class=\"hljs-built_in\">make<\/span><\/code><\/pre>\n<ul class=\"pre-numbering\">\n<li>1<\/li>\n<\/ul>\n<p>\u7f16\u8bd1\uff0c\u5b89\u88c5<\/p>\n<pre class=\"prettyprint\" name=\"code\"><code class=\"hljs cmake has-numbering\">make <span class=\"hljs-keyword\">install<\/span><\/code><\/pre>\n<ul class=\"pre-numbering\">\n<li>1<\/li>\n<\/ul>\n<p>\u5220\u9664\u65e7\u7684\u8f6f\u94fe\u63a5\uff0c\u521b\u5efa\u65b0\u7684\u8f6f\u94fe\u63a5\u5230\u6700\u65b0\u7684python<\/p>\n<pre class=\"prettyprint\" name=\"code\"><code class=\"hljs lasso has-numbering\">rm <span class=\"hljs-attribute\">-rf<\/span> \/usr\/bin\/python\n\nln <span class=\"hljs-attribute\">-s<\/span> \/usr\/<span class=\"hljs-built_in\">local<\/span>\/bin\/python3<span class=\"hljs-number\">.5<\/span> \/usr\/bin\/python\n\npython <span class=\"hljs-attribute\">-V<\/span><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5python3.5\u53ef\u80fd\u4f7f\u7528\u7684\u4f9d\u8d56 yum install openssl-devel bzip2 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-207","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"http:\/\/www.kejidana.com\/index.php?rest_route=\/wp\/v2\/posts\/207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.kejidana.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.kejidana.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.kejidana.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.kejidana.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=207"}],"version-history":[{"count":0,"href":"http:\/\/www.kejidana.com\/index.php?rest_route=\/wp\/v2\/posts\/207\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.kejidana.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.kejidana.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=207"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.kejidana.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}