{"id":288721,"date":"2023-12-05T21:13:36","date_gmt":"2023-12-05T13:13:36","guid":{"rendered":"https:\/\/lrxjmw.cn\/xzqzszjbjnzl.html"},"modified":"2023-12-05T21:13:36","modified_gmt":"2023-12-05T13:13:36","slug":"xzqzszjbjnzl","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/xzqzszjbjnzl.html","title":{"rendered":"\u6821\u957f\u4eb2\u81ea\u4e0a\u9635\uff0c\u4e5d\u6b65\u6559\u4f60\u5728Linux\u4e0a\u5b89\u88c5Python\uff0c\u8f7b\u677eget\u7f16\u7a0b\u6280\u80fd"},"content":{"rendered":"

\u4f5c\u4e3a\u4e00\u4f4d\u6821\u957f\uff0c\u6211\u6df1\u77e5\u638c\u63e1\u8ba1\u7b97\u673a\u6280\u80fd\u5bf9\u4e8e\u5b66\u751f\u4eec\u7684\u672a\u6765\u53d1\u5c55\u81f3\u5173\u91cd\u8981\u3002\u56e0\u6b64\uff0c\u6211\u51b3\u5b9a\u4eb2\u81ea\u5b66\u4e60\u5e76\u4f7f\u7528Python\u7f16\u7a0b\u8bed\u8a00python<\/a> linux \u5b89\u88c5<\/strong>linux\u64cd\u4f5c\u7cfb\u7edf\u539f\u7406\uff0c\u5e76\u9009\u62e9\u5728Linux<\/a>\u64cd\u4f5c\u7cfb\u7edf<\/a>\u4e0a\u8fdb\u884c\u5b89\u88c5\u3002\u5728\u8fd9\u4e2a\u7ecf\u9a8c\u5206\u4eab\u4e2d\uff0c\u6211\u5c06\u5411\u5927\u5bb6\u4ecb\u7ecd\u6211\u5728Python Linux\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u7684\u4e5d\u4e2a\u5173\u952e\u6b65\u9aa4\u3002<\/p>\n

\u7b2c\u4e00\u6b65\uff1a\u9009\u62e9\u5408\u9002\u7684Linux\u53d1\u884c\u7248<\/p>\n

\u5728\u5f00\u59cb\u4e4b\u524d\u7ea2\u5e3d\u5b50linux\uff0c\u6211\u4eec\u9700\u8981\u9009\u62e9\u4e00\u4e2a\u9002\u5408\u6211\u4eec\u7684Linux\u53d1\u884c\u7248\u3002\u6211\u9009\u62e9\u4e86Ubuntu\uff0c\u56e0\u4e3a\u5b83\u662f\u4e00\u4e2a\u7528\u6237\u53cb\u597d\u4e14\u529f\u80fd\u5f3a\u5927\u7684\u53d1\u884c\u7248\u3002<\/p>\n

\u7b2c\u4e8c\u6b65\uff1a\u4e0b\u8f7d\u548c\u5b89\u88c5Ubuntu<\/p>\n

\u5728Ubuntu\u5b98\u65b9\u7f51\u7ad9\u4e0a\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u7684Ubuntu ISO\u955c\u50cf\u6587\u4ef6\uff0c\u5e76\u5c06\u5176\u5199\u5165USB\u95ea\u5b58\u9a71\u52a8\u5668\u6216DVD\u5149\u76d8\u3002\u7136\u540e\uff0c\u901a\u8fc7\u5f15\u5bfc\u8ba1\u7b97\u673a\u4ece\u8be5\u8bbe\u5907\u542f\u52a8\u5e76\u6309\u7167\u5c4f\u5e55\u4e0a\u7684\u6307\u793a\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n

\u7535\u8111\u600e\u4e48\u5b89\u88c5Python_\u600e\u4e48\u5b89\u88c5Python_python linux \u5b89\u88c5<\/p>\n

\u7b2c\u4e09\u6b65\uff1a\u66f4\u65b0\u7cfb\u7edf<\/p>\n

\u4e00\u65e6Ubuntu\u5b89\u88c5\u5b8c\u6210python linux \u5b89\u88c5<\/strong>\uff0c\u6211\u4eec\u9700\u8981\u66f4\u65b0\u64cd\u4f5c\u7cfb\u7edf\u4ee5\u83b7\u53d6\u6700\u65b0\u7684\u8f6f\u4ef6\u5305\u548c\u4fee\u590d\u7a0b\u5e8f\u3002\u6253\u5f00\u7ec8\u7aef\u5e76\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4<\/a>\uff1a<\/p>\n

\n

\nsudo apt update\nsudo apt upgrade\n<\/pre>\n<\/p>\n

\u7b2c\u56db\u6b65\uff1a\u5b89\u88c5Python<\/p>\n

\u73b0\u5728\uff0c\u6211\u4eec\u53ef\u4ee5\u5f00\u59cb\u5b89\u88c5Python\u4e86\u3002\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo apt install python3\n<\/pre>\n<\/p>\n

\u6b64\u547d\u4ee4\u5c06\u5b89\u88c5Python 3\u7684\u6700\u65b0\u7248\u672c\u3002<\/p>\n

\u7b2c\u4e94\u6b65\uff1a\u5b89\u88c5pip<\/p>\n

pip\u662fPython\u7684\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\uff0c\u6211\u4eec\u9700\u8981\u5c06\u5176\u5b89\u88c5\u5230\u7cfb\u7edf\u4e2d\u3002\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo apt install python3-pip\n<\/pre>\n<\/p>\n

\u7b2c\u516d\u6b65\uff1a\u5b89\u88c5\u865a\u62df\u73af\u5883<\/p>\n

\u4e3a\u4e86\u66f4\u597d\u5730\u7ba1\u7406Python\u9879\u76ee\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u865a\u62df\u73af\u5883\u3002\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\nsudo apt install python3-venv\n<\/pre>\n<\/p>\n

\u7b2c\u4e03\u6b65\uff1a\u521b\u5efa\u548c\u6fc0\u6d3b\u865a\u62df\u73af\u5883<\/p>\n

\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u865a\u62df\u73af\u5883\uff0c\u5e76\u6fc0\u6d3b\u5b83\uff1a<\/p>\n

\n

\npython3 -m venv myenv\nsource myenv\/bin\/activate\n<\/pre>\n<\/p>\n

\u7b2c\u516b\u6b65\uff1a\u5b89\u88c5\u5e38\u7528\u7684Python\u5e93<\/p>\n

\u73b0\u5728\uff0c\u6211\u4eec\u53ef\u4ee5\u5b89\u88c5\u4e00\u4e9b\u5e38\u7528\u7684Python\u5e93\uff0c\u4ee5\u4fbf\u5728\u9879\u76ee\u4e2d\u4f7f\u7528\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5NumPy\u548cPandas\uff1a<\/p>\n

\n

\npip install numpy pandas\n<\/pre>\n<\/p>\n

\u7b2c\u4e5d\u6b65\uff1a\u9a8c\u8bc1\u5b89\u88c5\u7ed3\u679c<\/p>\n

\u6700\u540e\uff0c\u6211\u4eec\u9700\u8981\u9a8c\u8bc1\u6211\u4eec\u7684Python\u548c\u76f8\u5173\u5e93\u662f\u5426\u6210\u529f\u5b89\u88c5\u3002\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

\n

\npython --version\npip list\n<\/pre>\n<\/p>\n

\u5982\u679c\u663e\u793a\u4e86\u6b63\u786e\u7684Python\u7248\u672c\u548c\u5df2\u5b89\u88c5\u7684\u5e93\u5217\u8868\uff0c\u5219\u8bf4\u660e\u6211\u4eec\u6210\u529f\u5b8c\u6210\u4e86Python Linux\u5b89\u88c5\u3002<\/p>\n

\u901a\u8fc7\u8fd9\u4e5d\u4e2a\u5173\u952e\u6b65\u9aa4\uff0c\u6211\u6210\u529f\u5730\u5728Linux\u4e0a\u5b89\u88c5\u4e86Python\uff0c\u5e76\u4e14\u5f00\u59cb\u4eab\u53d7\u7f16\u7a0b\u7684\u4e50\u8da3\u3002\u5e0c\u671b\u6211\u7684\u7ecf\u9a8c\u5206\u4eab\u5bf9\u6b63\u5728\u5b66\u4e60Python\u548cLinux\u7684\u4f60\u4eec\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u4f5c\u4e3a\u4e00\u4f4d\u6821\u957f\uff0c\u6211\u6df1\u77e5\u638c\u63e1\u8ba1\u7b97\u673a\u6280\u80fd\u5bf9\u4e8e\u5b66\u751f\u4eec\u7684\u672a\u6765\u53d1\u5c55\u81f3\u5173\u91cd\u8981\u3002\u56e0\u6b64\uff0c\u6211\u51b3\u5b9a\u4eb2\u81ea\u5b66\u4e60\u5e76\u4f7f\u7528Python\u7f16\u7a0b\u8bed\u8a00\uff0c\u5e76\u9009\u62e9\u5728Linux\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fdb\u884c\u5b89\u88c5\u3002pip\u662fPython\u7684\u8f6f\u4ef6\u5305\u7ba1\u7406\u5668\uff0c\u6211\u4eec\u9700\u8981\u5c06\u5176\u5b89\u88c5\u5230\u7cfb\u7edf\u4e2d\u3002\u901a\u8fc7\u8fd9\u4e5d\u4e2a\u5173\u952e\u6b65\u9aa4\uff0c\u6211\u6210\u529f\u5730\u5728Linux\u4e0a\u5b89\u88c5\u4e86Python\uff0c\u5e76\u4e14\u5f00\u59cb\u4eab\u53d7\u7f16\u7a0b\u7684\u4e50\u8da3\u3002<\/p>\n","protected":false},"author":1,"featured_media":288722,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-288721","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/288721","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=288721"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/288721\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/288722"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=288721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=288721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=288721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}