{"id":192120,"date":"2020-06-04T10:34:08","date_gmt":"2020-06-04T02:34:08","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=192120"},"modified":"2020-05-23T11:35:18","modified_gmt":"2020-05-23T03:35:18","slug":"ubuntu-python","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/ubuntu-python.html","title":{"rendered":"\u5982\u4f55\u5728 Ubuntu \u4e0a\u5b89\u88c5 Python 3.8"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nPython\u662f\u4e00\u79cd\u89e3\u91ca\u578b\u3001\u9762\u5411\u5bf9\u8c61\u3001\u52a8\u6001\u6570\u636e\u7c7b\u578b\u7684\u9ad8\u7ea7\u7a0b\u5e8f\u8bbe\u8ba1\u8bed\u8a00\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

Python\u662f\u4e16\u754c\u4e0a\u4f7f\u7528\u6700\u5e7f\u6cdb\u7684\u7f16\u7a0b\u8bed\u8a00\u4e4b\u4e00\uff0c\u7531\u4e8e\u5176\u7b80\u5355\u6613\u5b66\u7684\u8bed\u6cd5\uff0cPython\u662f\u521d\u5b66\u8005\u548c\u6709\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\u7684\u70ed\u95e8\u9009\u62e9\uff0cPython\u662f\u4e00\u79cd\u76f8\u5f53\u901a\u7528\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u5b83\u53ef\u4ee5\u7528\u6765\u6784\u5efa\u5404\u79cd\u7c7b\u578b\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u4ece\u7b80\u5355\u7684\u811a\u672c\u5230\u590d\u6742\u7684\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\u3002Python 3.8\u662fPython\u8bed\u8a00\u7684\u6700\u65b0\u4e3b\u8981\u7248\u672c\uff0c\u5b83\u5305\u542b\u4e86\u8bb8\u591a\u65b0\u7684\u529f\u80fd\uff0c\u5982\u8d4b\u503c\u8868\u8fbe\u5f0f\u7b49\u3002<\/p>\n

\u4ee5root\u6216\u6709sudo\u8bbf\u95ee\u6743\u9650\u7684\u7528\u6237\u8eab\u4efd\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u66f4\u65b0\u8f6f\u4ef6\u5305\u5217\u8868\u5e76\u5b89\u88c5\u524d\u63d0\u6761\u4ef6\uff1a<\/p>\n

\r\nwuxiangping@linuxcool:~$ sudo apt update\r\nwuxiangping@linuxcool:~$ sudo apt install software-properties-common\r\n<\/pre>\n
\u542f\u7528\u7248\u672c\u5e93\uff0c\u5b89\u88c5Python 3.8<\/strong><\/span><\/div>\n
\r\nwuxiangping@linuxcool:~$ sudo apt install python3.8\r\n<\/pre>\n
\u9a8c\u8bc1\u662f\u5426\u5b89\u88c5\u6210\u529f<\/strong><\/span><\/div>\n
\r\nwuxiangping@linuxcool:~$ python3.8 --version\r\nPython 3.8.0\r\n<\/pre>\n

\u5230\u6b64\uff0cUbuntu 18.04\u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86Python 3.8\uff0c\u53ef\u4ee5\u5f00\u59cb\u5f00\u53d1Python 3\u9879\u76ee\u4e86\u3002<\/p>\n

python\u6253\u5370hello world!<\/strong><\/span><\/div>\n
\r\nwuxiangping@linuxcool:~$ vim app.py\r\n#!\/usr\/bin\/python3\r\nprint(\"Hello, World!\")\r\n<\/pre>\n

\u8fd0\u884cpython\u811a\u672c\uff1a<\/p>\n

\r\nwuxiangping@linuxcool:~$ python3 app.py\r\nHello, World!\r\n<\/pre>\n

\"\"<\/p>\n","protected":false},"excerpt":{"rendered":"

Python\u662f\u4e16\u754c\u4e0a\u4f7f\u7528\u6700\u5e7f\u6cdb\u7684\u7f16\u7a0b\u8bed\u8a00\u4e4b\u4e00\uff0c\u7531\u4e8e\u5176\u7b80\u5355\u6613\u5b66\u7684\u8bed\u6cd5\uff0cPython\u662f\u521d\u5b66\u8005\u548c\u6709\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\u7684\u70ed\u95e8 […]<\/p>\n","protected":false},"author":668,"featured_media":192138,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-192120","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/192120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/668"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=192120"}],"version-history":[{"count":9,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/192120\/revisions"}],"predecessor-version":[{"id":192151,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/192120\/revisions\/192151"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/192138"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=192120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=192120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=192120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}