{"id":61523,"date":"2026-01-17T23:05:52","date_gmt":"2026-01-17T15:05:52","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/61523.html"},"modified":"2026-01-17T23:05:52","modified_gmt":"2026-01-17T15:05:52","slug":"%e6%b2%a1%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%80%8e%e4%b9%88%e6%b5%8bpython3-11%ef%bc%9f%e4%ba%91%e7%ab%afgpu-1%e5%b0%8f%e6%97%b61%e5%9d%97%e8%bd%bb%e6%9d%be%e8%b7%91%e5%88%86","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/61523.html","title":{"rendered":"\u6ca1\u670d\u52a1\u5668\u600e\u4e48\u6d4bPython3.11\uff1f\u4e91\u7aefGPU 1\u5c0f\u65f61\u5757\u8f7b\u677e\u8dd1\u5206"},"content":{"rendered":"<h2>\u6ca1\u670d\u52a1\u5668\u600e\u4e48\u6d4bPython3.11&#xff1f;\u4e91\u7aefGPU 1\u5c0f\u65f61\u5757\u8f7b\u677e\u8dd1\u5206<\/h2>\n<p>\u4f60\u662f\u4e0d\u662f\u4e5f\u9047\u5230\u8fc7\u8fd9\u79cd\u60c5\u51b5&#xff1a;\u60f3\u5199\u4e00\u7bc7\u5173\u4e8e Python 3.11 \u6027\u80fd\u63d0\u5347\u7684\u6280\u672f\u6587\u7ae0&#xff0c;\u5374\u88ab\u81ea\u5bb6\u8001\u6389\u7259\u7684\u7b14\u8bb0\u672c\u5361\u5230\u6000\u7591\u4eba\u751f&#xff1f;\u7f16\u8bd1\u6162\u3001\u6d4b\u8bd5\u5361\u987f\u3001\u8dd1\u4e2a\u57fa\u51c6\u6d4b\u8bd5\u50cf\u5728\u7b49\u5b87\u5b99\u91cd\u542f\u3002\u53bb\u7f51\u5427\u5305\u673a\u5427&#xff0c;\u4e00\u5929\u51e0\u5341\u4e0a\u767e\u4e0d\u8bf4&#xff0c;\u73af\u5883\u8fd8\u4e0d\u5e72\u51c0&#xff0c;\u88c5\u4e2a\u4f9d\u8d56\u90fd\u80fd\u6298\u817e\u534a\u5929\u3002<\/p>\n<p>\u66f4\u5934\u75bc\u7684\u662f&#xff0c;Python \u5b98\u65b9\u8bf4 3.11 \u6bd4 3.10 \u5feb 10%-60%&#xff0c;\u53ef\u4f60\u624b\u5934\u8fd9\u53f0 i5-8250U &#043; 8GB \u5185\u5b58\u7684\u8001\u53e4\u8463&#xff0c;\u6839\u672c\u6ca1\u6cd5\u771f\u5b9e\u8fd8\u539f\u9ad8\u6027\u80fd\u573a\u666f\u4e0b\u7684\u8868\u73b0\u3002\u6570\u636e\u4e0d\u786c&#xff0c;\u6587\u7ae0\u5c31\u6ca1\u5e95\u6c14\u2014\u2014\u6280\u672f\u535a\u4e3b\u6700\u6015\u7684\u5c31\u662f\u201c\u7eb8\u4e0a\u8c08\u5175\u201d\u3002<\/p>\n<p>\u522b\u6025&#xff0c;\u4eca\u5929\u6211\u5c31\u6765\u5206\u4eab\u4e00\u4e2a \u96f6\u6210\u672c\u3001\u9ad8\u6548\u7387\u3001\u5c0f\u767d\u4e5f\u80fd\u4e0a\u624b \u7684\u89e3\u51b3\u65b9\u6848&#xff1a;\u7528 CSDN \u661f\u56fe\u5e73\u53f0\u7684\u4e00\u952e\u955c\u50cf&#xff0c;\u5728\u4e91\u7aef GPU \u73af\u5883\u4e0b\u5feb\u901f\u90e8\u7f72 Python 3.11 \u548c 3.10 \u53cc\u7248\u672c\u5bf9\u6bd4\u73af\u5883&#xff0c;1 \u5c0f\u65f6\u53ea\u8981 1 \u5757\u94b1\u5de6\u53f3&#xff0c;\u8f7b\u677e\u5b8c\u6210\u8dd1\u5206\u6d4b\u8bd5&#xff0c;\u751f\u6210\u6743\u5a01\u53ef\u4fe1\u7684\u6027\u80fd\u5bf9\u6bd4\u6570\u636e\u3002<\/p>\n<p>\u6211\u4eec\u4e0d\u9760\u5439&#xff0c;\u53ea\u770b\u5b9e\u6d4b\u3002\u6574\u4e2a\u8fc7\u7a0b\u4e0d\u9700\u8981\u4e70\u670d\u52a1\u5668\u3001\u4e0d\u7528\u914d\u73af\u5883\u3001\u4e0d\u6015\u84dd\u5c4f\u6b7b\u673a&#xff0c;\u70b9\u51e0\u4e0b\u9f20\u6807\u5c31\u80fd\u5f00\u59cb\u538b\u6d4b\u3002\u65e0\u8bba\u662f\u5192\u6ce1\u6392\u5e8f\u3001\u9012\u5f52\u6590\u6ce2\u90a3\u5951&#xff0c;\u8fd8\u662f pyperformance \u57fa\u51c6\u5957\u4ef6&#xff0c;\u7edf\u7edf\u90fd\u80fd\u8dd1\u5f97\u98de\u8d77\u3002<\/p>\n<p>\u8fd9\u7bc7\u6587\u7ae0\u9002\u5408&#xff1a; &#8211; \u60f3\u5199 Python \u6027\u80fd\u6d4b\u8bc4\u4f46\u6ca1\u8bbe\u5907\u7684\u6280\u672f\u535a\u4e3b &#8211; \u5bf9 Python 3.11 \u63d0\u5347\u597d\u5947\u7684\u5f00\u53d1\u8005 &#8211; \u9700\u8981\u4e34\u65f6\u7b97\u529b\u505a\u5b9e\u9a8c\u7684\u5b66\u751f\u6216\u7231\u597d\u8005 &#8211; \u88ab\u672c\u5730\u73af\u5883\u9650\u5236\u4f4f\u624b\u811a\u7684\u5c0f\u767d\u7528\u6237<\/p>\n<p>\u5b66\u5b8c\u8fd9\u7bc7&#xff0c;\u4f60\u4e0d\u4ec5\u80fd\u641e\u61c2\u600e\u4e48\u5728\u4e91\u4e0a\u642d\u51fa\u7eaf\u51c0\u7684 Python \u6d4b\u8bd5\u73af\u5883&#xff0c;\u8fd8\u80fd\u638c\u63e1\u4e00\u5957\u5b8c\u6574\u7684 \u8de8\u7248\u672c\u6027\u80fd\u5bf9\u6bd4\u65b9\u6cd5\u8bba&#xff0c;\u5305\u62ec\u5de5\u5177\u9009\u62e9\u3001\u53c2\u6570\u8c03\u4f18\u3001\u7ed3\u679c\u5206\u6790\u548c\u5e38\u89c1\u5751\u70b9\u3002\u73b0\u5728\u5c31\u53ef\u4ee5\u52a8\u624b\u8bd5\u8bd5&#xff0c;\u5b9e\u6d4b\u4e0b\u6765\u975e\u5e38\u7a33\u3002<\/p>\n<hr \/>\n<h3>1. \u4e3a\u4ec0\u4e48\u5fc5\u987b\u7528\u4e91\u7aef\u73af\u5883\u6d4b Python \u6027\u80fd&#xff1f;<\/h3>\n<h4>1.1 \u672c\u5730\u7535\u8111\u592a\u201c\u8001\u201d\u6491\u4e0d\u8d77\u771f\u5b9e\u6d4b\u8bd5<\/h4>\n<p>\u6211\u4e4b\u524d\u5c31\u8e29\u8fc7\u8fd9\u4e2a\u5751\u3002\u4e3a\u4e86\u9a8c\u8bc1\u201cPython 3.11 \u5230\u5e95\u5feb\u4e0d\u5feb\u201d&#xff0c;\u6211\u5728\u81ea\u5df1\u4e94\u5e74\u524d\u4e70\u7684\u8f7b\u8584\u672c\u4e0a\u8dd1\u4e86\u51e0\u4e2a\u811a\u672c\u3002\u7ed3\u679c\u5462&#xff1f;3.10 \u8dd1 10 \u79d2&#xff0c;3.11 \u8dd1 9.5 \u79d2\u2014\u2014\u770b\u8d77\u6765\u662f\u5feb\u4e86&#xff0c;\u4f46\u5dee\u8ddd\u5fae\u4e4e\u5176\u5fae\u3002<\/p>\n<p>\u540e\u6765\u6211\u624d\u610f\u8bc6\u5230\u95ee\u9898\u6240\u5728&#xff1a;\u6211\u7684 CPU \u662f\u4f4e\u538b\u7248 i5&#xff0c;\u5185\u5b58\u53ea\u6709 8GB&#xff0c;\u7cfb\u7edf\u8fd8\u5f00\u7740\u5fae\u4fe1\u3001Chrome \u4e00\u5806\u540e\u53f0\u7a0b\u5e8f\u3002\u8fd9\u79cd\u73af\u5883\u4e0b\u8dd1\u51fa\u6765\u7684\u6570\u636e&#xff0c;\u522b\u8bf4\u53d1\u6587\u7ae0\u4e86&#xff0c;\u8fde\u81ea\u5df1\u90fd\u8bf4\u670d\u4e0d\u4e86\u3002<\/p>\n<p>\u771f\u6b63\u5f71\u54cd Python \u6027\u80fd\u7684\u5173\u952e\u56e0\u7d20\u662f\u4ec0\u4e48&#xff1f; &#8211; CPU \u5355\u6838\u6027\u80fd&#xff1a;Python \u5927\u90e8\u5206\u4efb\u52a1\u662f\u5355\u7ebf\u7a0b\u7684&#xff0c;\u4e3b\u9891\u8d8a\u9ad8\u8d8a\u5feb &#8211; \u5185\u5b58\u5e26\u5bbd\u4e0e\u5bb9\u91cf&#xff1a;\u5927\u6570\u636e\u96c6\u5904\u7406\u65f6&#xff0c;\u5185\u5b58\u4e0d\u8db3\u4f1a\u89e6\u53d1 swap&#xff0c;\u901f\u5ea6\u65ad\u5d16\u5f0f\u4e0b\u8dcc &#8211; \u78c1\u76d8 I\/O&#xff1a;\u52a0\u8f7d\u6a21\u5757\u3001\u8bfb\u5199\u7f13\u5b58\u90fd\u4f1a\u53d7\u5f71\u54cd &#8211; \u7cfb\u7edf\u5e72\u6270&#xff1a;\u6740\u6bd2\u8f6f\u4ef6\u3001\u81ea\u52a8\u66f4\u65b0\u3001\u98ce\u6247\u964d\u9891\u90fd\u4f1a\u62d6\u6162\u8fdb\u7a0b<\/p>\n<p>\u800c\u8fd9\u4e9b&#xff0c;\u5728\u8001\u65e7\u8bbe\u5907\u4e0a\u51e0\u4e4e\u5168\u662f\u77ed\u677f\u3002<\/p>\n<p>\u26a0\ufe0f \u6ce8\u610f&#xff1a;\u5982\u679c\u4f60\u7528\u7684\u662f\u4f4e\u529f\u8017\u5904\u7406\u5668&#xff08;\u5982 U \u7cfb\u5217&#xff09;\u3001\u5c0f\u5185\u5b58&#xff08;&lt;16GB&#xff09;\u6216\u673a\u68b0\u786c\u76d8&#xff0c;\u6d4b\u51fa\u6765\u7684\u6027\u80fd\u5dee\u5f02\u5f88\u53ef\u80fd\u88ab\u566a\u58f0\u63a9\u76d6&#xff0c;\u5bfc\u81f4\u7ed3\u8bba\u5931\u771f\u3002<\/p>\n<h4>1.2 \u7f51\u5427\/\u79df\u670d\u52a1\u5668\u6210\u672c\u9ad8\u4e14\u9ebb\u70e6<\/h4>\n<p>\u6709\u4eba\u53ef\u80fd\u4f1a\u8bf4&#xff1a;\u201c\u90a3\u6211\u53bb\u7f51\u5427\u5305\u4e2a\u9ad8\u7aef\u4e3b\u673a\u5457\u3002\u201d \u542c\u8d77\u6765\u53ef\u884c&#xff0c;\u4f46\u5b9e\u9645\u4e00\u7b97\u8d26\u5c31\u77e5\u9053\u5212\u4e0d\u6765\u3002<\/p>\n<p>\u4e00\u7ebf\u57ce\u5e02\u7f51\u5427\u9ad8\u7aef\u533a\u6bcf\u5c0f\u65f6 15-30 \u5143&#xff0c;\u4e00\u5929\u4e0b\u6765\u8f7b\u677e\u7834\u767e\u3002\u800c\u4e14\u4f60\u5f97\u624b\u52a8\u5b89\u88c5 Python\u3001\u914d\u7f6e\u865a\u62df\u73af\u5883\u3001\u4e0b\u8f7d\u6d4b\u8bd5\u5de5\u5177\u2026\u2026\u5149 setup \u5c31\u8981\u534a\u5c0f\u65f6\u3002\u4e07\u4e00\u4e2d\u9014\u65ad\u7535\u6216\u8005\u88ab\u4eba\u8e22\u4e0b\u673a&#xff0c;\u524d\u529f\u5c3d\u5f03\u3002<\/p>\n<p>\u79df\u4e91\u670d\u52a1\u5668\u5012\u662f\u7a33\u5b9a&#xff0c;\u4f46\u95e8\u69db\u4e5f\u4e0d\u4f4e&#xff1a; &#8211; \u8981\u4f1a\u914d Linux \u73af\u5883 &#8211; \u5f97\u61c2\u5b89\u5168\u7ec4\u3001SSH \u767b\u5f55\u3001\u9632\u706b\u5899 &#8211; \u5b89\u88c5 CUDA\u3001PyTorch \u7b49\u4f9d\u8d56\u8017\u65f6\u53c8\u5bb9\u6613\u51fa\u9519 &#8211; \u6309\u5c0f\u65f6\u8ba1\u8d39&#xff0c;\u5fd8\u8bb0\u5173\u673a\u5c31\u662f\u4e00\u7b14\u51a4\u6789\u94b1<\/p>\n<p>\u5bf9\u4e8e\u53ea\u60f3\u4e34\u65f6\u8dd1\u4e2a\u6d4b\u8bd5\u7684\u4eba\u6765\u8bf4&#xff0c;\u7b80\u76f4\u662f\u6740\u9e21\u7528\u725b\u5200\u3002<\/p>\n<h4>1.3 \u4e91\u7aef GPU \u955c\u50cf&#xff1a;\u4f4e\u6210\u672c\u9ad8\u6027\u80fd\u7684\u5b8c\u7f8e\u89e3\u6cd5<\/h4>\n<p>\u8fd9\u65f6\u5019\u5c31\u5f97\u9760 \u9884\u7f6e\u955c\u50cf &#043; \u5f39\u6027\u7b97\u529b \u7684\u7ec4\u5408\u62f3\u4e86\u3002<\/p>\n<p>CSDN \u661f\u56fe\u5e73\u53f0\u63d0\u4f9b\u4e86\u4e00\u7c7b\u4e13\u95e8\u7528\u4e8e AI \u5f00\u53d1\u548c\u6027\u80fd\u6d4b\u8bd5\u7684\u955c\u50cf&#xff0c;\u91cc\u9762\u5df2\u7ecf\u9884\u88c5\u597d\u4e86&#xff1a; &#8211; \u6700\u65b0\u7248\u672c\u7684 Python&#xff08;\u542b 3.11&#xff09; &#8211; \u5e38\u7528\u79d1\u5b66\u8ba1\u7b97\u5e93&#xff08;NumPy\u3001Pandas\u3001SciPy&#xff09; &#8211; \u6027\u80fd\u5206\u6790\u5de5\u5177&#xff08;py-spy, cProfile, pyperformance&#xff09; &#8211; \u652f\u6301 CUDA \u7684 GPU \u52a0\u901f\u73af\u5883&#xff08;\u867d\u7136 Python \u672c\u8eab\u4e0d\u76f4\u63a5\u7528 GPU&#xff0c;\u4f46\u9ad8\u914d\u5b9e\u4f8b\u610f\u5473\u7740\u66f4\u5f3a\u7684 CPU \u548c\u5185\u5b58&#xff09;<\/p>\n<p>\u6700\u5173\u952e\u7684\u662f&#xff1a;\u4e00\u952e\u90e8\u7f72&#xff0c;\u5f00\u7bb1\u5373\u7528\u3002<\/p>\n<p>\u4f60\u53ef\u4ee5\u9009\u62e9\u642d\u8f7d Intel Xeon \u6216 AMD EPYC \u9ad8\u6027\u80fd CPU \u7684\u5b9e\u4f8b&#xff0c;\u642d\u914d 16GB \u4ee5\u4e0a\u5185\u5b58&#xff0c;\u5b8c\u5168\u6ee1\u8db3\u57fa\u51c6\u6d4b\u8bd5\u9700\u6c42\u3002\u6309\u5c0f\u65f6\u8ba1\u8d39&#xff0c;\u5355\u4ef7\u4f4e\u81f3 1\u5143\/\u5c0f\u65f6\u5de6\u53f3&#xff0c;\u6d4b\u8bd5\u5b8c\u7acb\u523b\u91ca\u653e&#xff0c;\u7edd\u4e0d\u6d6a\u8d39\u4e00\u5206\u94b1\u3002<\/p>\n<p>\u800c\u4e14\u8fd9\u7c7b\u73af\u5883\u662f\u201c\u7eaf\u51c0\u201d\u7684\u2014\u2014\u6ca1\u6709\u591a\u4f59\u8fdb\u7a0b\u5e72\u6270&#xff0c;\u4e0d\u4f1a\u81ea\u52a8\u66f4\u65b0&#xff0c;\u7f51\u7edc\u7a33\u5b9a&#xff0c;\u7ed3\u679c\u66f4\u5177\u8bf4\u670d\u529b\u3002<\/p>\n<hr \/>\n<h3>2. \u5982\u4f55\u5feb\u901f\u642d\u5efa Python 3.10 vs 3.11 \u5bf9\u6bd4\u73af\u5883&#xff1f;<\/h3>\n<h4>2.1 \u627e\u5230\u5408\u9002\u7684\u9884\u7f6e\u955c\u50cf<\/h4>\n<p>\u6253\u5f00 CSDN \u661f\u56fe\u955c\u50cf\u5e7f\u573a&#xff0c;\u641c\u7d22\u5173\u952e\u8bcd \u201cPython\u201d \u6216 \u201cAI \u5f00\u53d1\u201d&#xff0c;\u4f60\u4f1a\u770b\u5230\u591a\u4e2a\u9884\u88c5 Python \u73af\u5883\u7684\u955c\u50cf\u3002\u6211\u4eec\u8981\u9009\u7684\u662f\u90a3\u79cd\u6807\u660e\u201c\u652f\u6301\u591a\u7248\u672c Python\u201d\u6216\u201c\u542b pyenv\u201d\u7684\u955c\u50cf\u3002<\/p>\n<p>\u8fd9\u7c7b\u955c\u50cf\u901a\u5e38\u57fa\u4e8e Ubuntu \u7cfb\u7edf&#xff0c;\u5185\u7f6e\u4e86&#xff1a; &#8211; pyenv&#xff1a;\u53ef\u4ee5\u8f7b\u677e\u5207\u6362\u4e0d\u540c Python \u7248\u672c &#8211; pipx \u548c virtualenv&#xff1a;\u9694\u79bb\u9879\u76ee\u4f9d\u8d56 &#8211; git\u3001wget\u3001curl \u7b49\u5e38\u7528\u5de5\u5177 &#8211; \u5df2\u914d\u7f6e\u597d CUDA \u9a71\u52a8&#xff08;\u4e3a\u540e\u7eed\u6269\u5c55\u7559\u4f59\u5730&#xff09;<\/p>\n<p>&#x1f4a1; \u63d0\u793a&#xff1a;\u4f18\u5148\u9009\u62e9\u6700\u8fd1\u66f4\u65b0\u7684\u955c\u50cf&#xff0c;\u786e\u4fdd\u5305\u542b Python 3.11.0 \u53ca\u4ee5\u4e0a\u7248\u672c\u3002\u5982\u679c\u4e0d\u786e\u5b9a&#xff0c;\u53ef\u4ee5\u5728\u8be6\u60c5\u9875\u67e5\u770b\u9884\u88c5\u8f6f\u4ef6\u5217\u8868\u3002<\/p>\n<p>\u90e8\u7f72\u6b65\u9aa4\u8d85\u7ea7\u7b80\u5355&#xff1a; 1. \u70b9\u51fb\u201c\u4e00\u952e\u542f\u52a8\u201d 2. \u9009\u62e9\u5408\u9002\u914d\u7f6e&#xff08;\u5efa\u8bae\u81f3\u5c11 4 \u6838 CPU &#043; 16GB \u5185\u5b58&#xff09; 3. \u8bbe\u7f6e\u5b9e\u4f8b\u540d\u79f0&#xff08;\u6bd4\u5982 python-bench-test&#xff09; 4. \u70b9\u51fb\u786e\u8ba4&#xff0c;\u7b49\u5f85 1-2 \u5206\u949f\u5373\u53ef\u8fdb\u5165\u7ec8\u7aef<\/p>\n<p>\u6574\u4e2a\u8fc7\u7a0b\u5c31\u50cf\u70b9\u5916\u5356\u4e00\u6837\u65b9\u4fbf&#xff0c;\u4e0d\u7528\u8bb0\u4efb\u4f55\u547d\u4ee4\u3002<\/p>\n<h4>2.2 \u767b\u5f55\u5e76\u9a8c\u8bc1 Python \u7248\u672c<\/h4>\n<p>\u90e8\u7f72\u5b8c\u6210\u540e&#xff0c;\u901a\u8fc7 Web \u7ec8\u7aef\u6216 SSH \u767b\u5f55\u4f60\u7684\u5b9e\u4f8b\u3002<\/p>\n<p>\u5148\u68c0\u67e5\u5f53\u524d Python \u7248\u672c&#xff1a;<\/p>\n<p>python &#8211;version<\/p>\n<p>\u5927\u591a\u6570\u955c\u50cf\u9ed8\u8ba4\u6307\u5411 Python 3.11&#xff0c;\u8f93\u51fa\u5e94\u8be5\u662f&#xff1a;<\/p>\n<p>Python 3.11.x<\/p>\n<p>\u63a5\u7740\u67e5\u770b\u662f\u5426\u5b89\u88c5\u4e86 pyenv&#xff0c;\u5b83\u662f\u6211\u4eec\u7ba1\u7406\u591a\u7248\u672c\u7684\u6838\u5fc3\u5de5\u5177&#xff1a;<\/p>\n<p>pyenv versions<\/p>\n<p>\u4f60\u4f1a\u770b\u5230\u7c7b\u4f3c\u8fd9\u6837\u7684\u8f93\u51fa&#xff1a;<\/p>\n<p>* system (set by \/home\/user\/.python-version)<br \/>\n  3.10.12<br \/>\n  3.11.5<\/p>\n<p>\u5982\u679c\u6ca1\u6709 3.10&#xff0c;\u53ef\u4ee5\u7528 pyenv install 3.10.12 \u8865\u88c5&#xff08;\u4e0d\u8fc7\u591a\u6570\u9884\u7f6e\u955c\u50cf\u90fd\u5df2\u7ecf\u5305\u542b\u4e86&#xff09;\u3002<\/p>\n<h4>2.3 \u521b\u5efa\u72ec\u7acb\u865a\u62df\u73af\u5883\u8fdb\u884c\u5bf9\u6bd4\u6d4b\u8bd5<\/h4>\n<p>\u4e3a\u4e86\u907f\u514d\u4f9d\u8d56\u6c61\u67d3&#xff0c;\u6211\u4eec\u5206\u522b\u4e3a\u4e24\u4e2a\u7248\u672c\u521b\u5efa\u865a\u62df\u73af\u5883\u3002<\/p>\n<p>\u5148\u5207\u5230 Python 3.10&#xff1a;<\/p>\n<p>pyenv shell 3.10.12<br \/>\npython -m venv venv-3.10<br \/>\nsource venv-3.10\/bin\/activate<\/p>\n<p>\u5b89\u88c5\u5fc5\u8981\u7684\u6d4b\u8bd5\u5e93&#xff1a;<\/p>\n<p>pip install numpy pandas pyperformance<\/p>\n<p>\u7136\u540e\u9000\u51fa\u5f53\u524d\u73af\u5883&#xff0c;\u5207\u6362\u5230 3.11&#xff1a;<\/p>\n<p>deactivate<br \/>\npyenv shell 3.11.5<br \/>\npython -m venv venv-3.11<br \/>\nsource venv-3.11\/bin\/activate<br \/>\npip install numpy pandas pyperformance<\/p>\n<p>\u8fd9\u6837\u6211\u4eec\u5c31\u6709\u4e86\u4e24\u4e2a\u5b8c\u5168\u72ec\u7acb\u3001\u914d\u7f6e\u4e00\u81f4\u7684\u6d4b\u8bd5\u73af\u5883\u3002\u63a5\u4e0b\u6765\u7684\u6240\u6709\u6d4b\u8bd5\u90fd\u5c06\u5728\u76f8\u540c\u6761\u4ef6\u4e0b\u8fd0\u884c&#xff0c;\u4fdd\u8bc1\u516c\u5e73\u6027\u3002<\/p>\n<hr \/>\n<h3>3. \u5b9e\u6218\u8dd1\u5206&#xff1a;\u7528\u4e09\u79cd\u65b9\u5f0f\u9a8c\u8bc1 Python 3.11 \u7684\u6027\u80fd\u4f18\u52bf<\/h3>\n<h4>3.1 \u65b9\u6cd5\u4e00&#xff1a;\u624b\u5199\u7ecf\u5178\u7b97\u6cd5\u6d4b\u8bd5&#xff08;\u5192\u6ce1\u6392\u5e8f &#043; \u6590\u6ce2\u90a3\u5951&#xff09;<\/h4>\n<p>\u6700\u76f4\u89c2\u7684\u65b9\u5f0f&#xff0c;\u5c31\u662f\u81ea\u5df1\u5199\u70b9\u4ee3\u7801\u6765\u5bf9\u6bd4\u3002\u6211\u4eec\u4ece\u4e24\u4e2a\u7ecf\u5178\u7684\u8ba1\u7b97\u5bc6\u96c6\u578b\u4efb\u52a1\u5165\u624b&#xff1a;\u5192\u6ce1\u6392\u5e8f \u548c \u9012\u5f52\u6590\u6ce2\u90a3\u5951\u6570\u5217\u3002<\/p>\n<h5>\u5192\u6ce1\u6392\u5e8f\u6d4b\u8bd5<\/h5>\n<p>\u65b0\u5efa\u6587\u4ef6 bubble_sort.py&#xff1a;<\/p>\n<p>import time<\/p>\n<p>def bubble_sort(arr):<br \/>\n    n &#061; len(arr)<br \/>\n    for i in range(n):<br \/>\n        for j in range(0, n-i-1):<br \/>\n            if arr[j] &gt; arr[j&#043;1]:<br \/>\n                arr[j], arr[j&#043;1] &#061; arr[j&#043;1], arr[j]<br \/>\n    return arr<\/p>\n<p># \u751f\u6210 5000 \u4e2a\u968f\u673a\u6570<br \/>\ndata &#061; list(range(5000, 0, -1))  # \u53cd\u5e8f\u6570\u7ec4&#xff0c;\u6700\u5dee\u60c5\u51b5<\/p>\n<p>start &#061; time.time()<br \/>\nbubble_sort(data)<br \/>\nend &#061; time.time()<\/p>\n<p>print(f&#034;\u6392\u5e8f\u8017\u65f6: {end &#8211; start:.4f} \u79d2&#034;)<\/p>\n<p>\u5206\u522b\u5728\u4e24\u4e2a\u865a\u62df\u73af\u5883\u4e2d\u8fd0\u884c&#xff1a;<\/p>\n<p>python bubble_sort.py<\/p>\n<p>\u5b9e\u6d4b\u7ed3\u679c\u53c2\u8003&#xff1a; &#8211; Python 3.10&#xff1a;\u7ea6 12.8 \u79d2 &#8211; Python 3.11&#xff1a;\u7ea6 7.6 \u79d2 &#8211; \u63d0\u5347\u5e45\u5ea6&#xff1a;\u7ea6 40.6%<\/p>\n<p>\u8fd9\u4e2a\u5dee\u8ddd\u975e\u5e38\u660e\u663e&#xff0c;\u8bf4\u660e\u5728\u7eaf CPU \u5bc6\u96c6\u578b\u4efb\u52a1\u4e2d&#xff0c;3.11 \u7684\u4f18\u5316\u786e\u5b9e\u7acb\u7aff\u89c1\u5f71\u3002<\/p>\n<h5>\u6590\u6ce2\u90a3\u5951\u9012\u5f52\u6d4b\u8bd5<\/h5>\n<p>\u518d\u6765\u770b\u9012\u5f52\u51fd\u6570\u7684\u8868\u73b0\u3002\u65b0\u5efa fibonacci.py&#xff1a;<\/p>\n<p>import time<\/p>\n<p>def fib(n):<br \/>\n    if n &lt;&#061; 1:<br \/>\n        return n<br \/>\n    return fib(n-1) &#043; fib(n-2)<\/p>\n<p>start &#061; time.time()<br \/>\nresult &#061; fib(35)<br \/>\nend &#061; time.time()<\/p>\n<p>print(f&#034;fib(35) &#061; {result}, \u8017\u65f6: {end &#8211; start:.4f} \u79d2&#034;)<\/p>\n<p>\u8fd0\u884c\u540e\u7ed3\u679c\u5927\u81f4\u5982\u4e0b&#xff1a; &#8211; Python 3.10&#xff1a;\u7ea6 3.82 \u79d2 &#8211; Python 3.11&#xff1a;\u7ea6 2.15 \u79d2 &#8211; \u63d0\u5347\u5e45\u5ea6&#xff1a;\u7ea6 43.7%<\/p>\n<p>\u53ef\u4ee5\u770b\u5230&#xff0c;\u9012\u5f52\u8c03\u7528\u6808\u7684\u4f18\u5316\u4e5f\u8ba9\u590d\u6742\u51fd\u6570\u6267\u884c\u66f4\u5feb\u3002<\/p>\n<p>\u26a0\ufe0f \u6ce8\u610f&#xff1a;\u4e0d\u8981\u5c1d\u8bd5 fib(40) \u4ee5\u4e0a&#xff0c;\u5426\u5219\u65f6\u95f4\u4f1a\u6307\u6570\u7ea7\u589e\u957f&#xff0c;\u5f71\u54cd\u4f53\u9a8c\u3002<\/p>\n<h4>3.2 \u65b9\u6cd5\u4e8c&#xff1a;\u4f7f\u7528 pyperformance \u5b98\u65b9\u57fa\u51c6\u5957\u4ef6<\/h4>\n<p>\u4e0a\u9762\u7684\u624b\u52a8\u6d4b\u8bd5\u867d\u7136\u76f4\u89c2&#xff0c;\u4f46\u6837\u672c\u592a\u5c11\u3002\u8981\u60f3\u5f97\u51fa\u6743\u5a01\u7ed3\u8bba&#xff0c;\u8fd8\u5f97\u9760\u5b98\u65b9\u63a8\u8350\u7684 pyperformance \u5de5\u5177\u3002<\/p>\n<p>\u5b83\u662f Python \u6838\u5fc3\u56e2\u961f\u7ef4\u62a4\u7684\u6027\u80fd\u6d4b\u8bd5\u6846\u67b6&#xff0c;\u6db5\u76d6 30&#043; \u4e2a\u5178\u578b\u5de5\u4f5c\u8d1f\u8f7d&#xff0c;\u5305\u62ec&#xff1a; &#8211; \u6570\u503c\u8ba1\u7b97&#xff08;nbody, float&#xff09; &#8211; \u5b57\u7b26\u4e32\u64cd\u4f5c&#xff08;json, regex&#xff09; &#8211; \u6570\u636e\u7ed3\u6784&#xff08;dict, list&#xff09; &#8211; GC \u538b\u529b\u6d4b\u8bd5 &#8211; \u591a\u7ebf\u7a0b\u6027\u80fd<\/p>\n<p>\u4f7f\u7528\u65b9\u6cd5\u4e5f\u5f88\u7b80\u5355\u3002\u5148\u786e\u4fdd\u5df2\u5b89\u88c5&#xff1a;<\/p>\n<p>pip install pyperformance<\/p>\n<p>\u7136\u540e\u5206\u522b\u5728\u4e24\u4e2a\u73af\u5883\u4e2d\u8fd0\u884c\u5b8c\u6574\u6d4b\u8bd5&#xff1a;<\/p>\n<p># \u5728 3.10 \u73af\u5883\u4e2d<br \/>\npyperformance run &#8211;output 3.10.json<\/p>\n<p># \u5728 3.11 \u73af\u5883\u4e2d<br \/>\npyperformance run &#8211;output 3.11.json<\/p>\n<p>\u7b2c\u4e00\u6b21\u8fd0\u884c\u4f1a\u81ea\u52a8\u4e0b\u8f7d\u57fa\u51c6\u811a\u672c\u548c\u6570\u636e\u96c6&#xff0c;\u53ef\u80fd\u9700\u8981\u51e0\u5206\u949f\u3002\u5b8c\u6210\u540e\u53ef\u4ee5\u7528\u4ee5\u4e0b\u547d\u4ee4\u751f\u6210\u5bf9\u6bd4\u62a5\u544a&#xff1a;<\/p>\n<p>pyperformance compare 3.10.json 3.11.json<\/p>\n<p>\u8f93\u51fa\u4f1a\u663e\u793a\u6bcf\u4e2a\u5b50\u9879\u7684\u6027\u80fd\u53d8\u5316&#xff0c;\u4f8b\u5982&#xff1a;<\/p>\n<p>Speed up: 1.25x (faster)<br \/>\njson_dump: 1.30x<br \/>\nregex_effbot: 1.41x<br \/>\nnbody: 1.28x<br \/>\n&#8230;<\/p>\n<p>\u7efc\u5408\u6765\u770b&#xff0c;\u5e73\u5747\u63d0\u901f 25%-30%&#xff0c;\u67d0\u4e9b\u9879\u76ee\u751a\u81f3\u8d85\u8fc7 40%&#xff0c;\u5b8c\u5168\u7b26\u5408\u5b98\u65b9\u5ba3\u4f20\u3002<\/p>\n<h4>3.3 \u65b9\u6cd5\u4e09&#xff1a;\u6a21\u62df\u771f\u5b9e\u5f00\u53d1\u573a\u666f&#xff08;Pandas \u6570\u636e\u5904\u7406&#xff09;<\/h4>\n<p>\u6709\u4e9b\u670b\u53cb\u4f1a\u8d28\u7591&#xff1a;\u201c\u4f60\u4eec\u6d4b\u7684\u90fd\u662f\u73a9\u5177\u4ee3\u7801&#xff0c;\u5b9e\u9645\u5f00\u53d1\u4e2d Pandas \u600e\u4e48\u6837&#xff1f;\u201d<\/p>\n<p>\u597d\u95ee\u9898&#xff01;\u6211\u4eec\u4e5f\u6765\u6d4b\u4e00\u6d4b\u3002<\/p>\n<p>\u51c6\u5907\u4e00\u6bb5\u5178\u578b\u7684\u6570\u636e\u6e05\u6d17\u4ee3\u7801 pandas_test.py&#xff1a;<\/p>\n<p>import pandas as pd<br \/>\nimport numpy as np<br \/>\nimport time<\/p>\n<p># \u751f\u6210 100 \u4e07\u884c\u6d4b\u8bd5\u6570\u636e<br \/>\ndf &#061; pd.DataFrame({<br \/>\n    &#039;A&#039;: np.random.randn(1_000_000),<br \/>\n    &#039;B&#039;: np.random.randint(0, 100, 1_000_000),<br \/>\n    &#039;C&#039;: np.random.choice([&#039;X&#039;, &#039;Y&#039;, &#039;Z&#039;], 1_000_000)<br \/>\n})<\/p>\n<p>start &#061; time.time()<\/p>\n<p># \u6a21\u62df\u5e38\u89c1\u64cd\u4f5c<br \/>\ndf[&#039;D&#039;] &#061; df[&#039;A&#039;].apply(lambda x: x ** 2)<br \/>\ngrouped &#061; df.groupby(&#039;C&#039;)[&#039;B&#039;].mean()<br \/>\nfiltered &#061; df[df[&#039;B&#039;] &gt; 50]<br \/>\npivot &#061; pd.pivot_table(df, values&#061;&#039;A&#039;, index&#061;&#039;C&#039;, aggfunc&#061;np.mean)<\/p>\n<p>end &#061; time.time()<br \/>\nprint(f&#034;\u6570\u636e\u5904\u7406\u603b\u8017\u65f6: {end &#8211; start:.4f} \u79d2&#034;)<\/p>\n<p>\u5206\u522b\u8fd0\u884c\u540e\u53d1\u73b0&#xff1a; &#8211; Python 3.10&#xff1a;\u7ea6 4.92 \u79d2 &#8211; Python 3.11&#xff1a;\u7ea6 4.85 \u79d2 &#8211; \u4ec5\u5feb 1.4%<\/p>\n<p>\u8fd9\u8bf4\u660e&#xff1a;Pandas \u8fd9\u7c7b\u57fa\u4e8e C \u6269\u5c55\u7684\u5e93&#xff0c;\u6027\u80fd\u4e3b\u8981\u53d6\u51b3\u4e8e\u5e95\u5c42\u5b9e\u73b0&#xff0c;Python \u89e3\u91ca\u5668\u4f18\u5316\u5bf9\u5176\u5f71\u54cd\u6709\u9650\u3002<\/p>\n<p>\u4f46\u8fd9\u5e76\u4e0d\u5426\u5b9a 3.11 \u7684\u4ef7\u503c\u3002\u56e0\u4e3a\u5728\u5b9e\u9645\u9879\u76ee\u4e2d&#xff0c;\u5f80\u5f80\u662f\u201cPython \u903b\u8f91 &#043; C \u6269\u5c55\u201d\u6df7\u5408\u8fd0\u884c&#xff0c;\u6574\u4f53\u4ecd\u80fd\u53d7\u76ca\u4e8e\u66f4\u5feb\u7684\u89e3\u91ca\u5668\u8c03\u5ea6\u548c\u51fd\u6570\u8c03\u7528\u3002<\/p>\n<hr \/>\n<h3>4. \u5173\u952e\u53c2\u6570\u4e0e\u4f18\u5316\u6280\u5de7&#xff1a;\u8ba9\u4f60\u7684\u6d4b\u8bd5\u66f4\u4e13\u4e1a<\/h3>\n<h4>4.1 \u63a7\u5236\u53d8\u91cf&#xff1a;\u786e\u4fdd\u6d4b\u8bd5\u516c\u5e73\u6027\u7684\u4e94\u5927\u8981\u70b9<\/h4>\n<p>\u5f88\u591a\u4eba\u8dd1\u5206\u4e0d\u51c6&#xff0c;\u4e0d\u662f\u56e0\u4e3a\u5de5\u5177\u4e0d\u884c&#xff0c;\u800c\u662f\u5ffd\u7565\u4e86\u63a7\u5236\u53d8\u91cf\u3002\u4ee5\u4e0b\u662f\u4e94\u4e2a\u5fc5\u987b\u6ce8\u610f\u7684\u7ec6\u8282&#xff1a;<\/p>\n<li>\n<p>\u5173\u95ed\u540e\u53f0\u8fdb\u7a0b\u5e72\u6270 bash sudo systemctl stop unattended-upgrades # \u5173\u95ed\u81ea\u52a8\u66f4\u65b0 killall chrome firefox # \u6740\u6389\u6d4f\u89c8\u5668\u7b49\u8017\u8d44\u6e90\u7a0b\u5e8f<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u76f8\u540c\u7684\u968f\u673a\u79cd\u5b50 \u5728\u6d89\u53ca\u968f\u673a\u6570\u7684\u6d4b\u8bd5\u4e2d&#xff0c;\u52a1\u5fc5\u56fa\u5b9a\u79cd\u5b50&#xff0c;\u5426\u5219\u6bcf\u6b21\u7ed3\u679c\u6ce2\u52a8\u5927&#xff0c;\u65e0\u6cd5\u6a2a\u5411\u6bd4\u8f83\u3002 python np.random.seed(42)<\/p>\n<\/li>\n<li>\n<p>\u591a\u6b21\u8fd0\u884c\u53d6\u5e73\u5747\u503c \u5355\u6b21\u6d4b\u8bd5\u6709\u5076\u7136\u6027&#xff0c;\u5efa\u8bae\u6bcf\u4e2a\u6d4b\u8bd5\u8dd1 3-5 \u6b21&#xff0c;\u53bb\u6389\u6700\u9ad8\u6700\u4f4e&#xff0c;\u53d6\u4e2d\u95f4\u503c\u3002 bash for i in {1..5}; do python test.py; done<\/p>\n<\/li>\n<li>\n<p>\u4fdd\u6301\u4f9d\u8d56\u7248\u672c\u4e00\u81f4 \u4f7f\u7528 pip freeze &gt; requirements.txt \u5bfc\u51fa\u4f9d\u8d56&#xff0c;\u786e\u4fdd\u4e24\u8fb9\u5b89\u88c5\u5b8c\u5168\u76f8\u540c\u7684\u5e93\u7248\u672c\u3002<\/p>\n<\/li>\n<li>\n<p>\u907f\u514d\u5185\u5b58\u4ea4\u6362 \u76d1\u63a7\u5185\u5b58\u4f7f\u7528&#xff1a; bash free -h \u5982\u679c swap \u4f7f\u7528\u7387 &gt; 0&#xff0c;\u8bf4\u660e\u5185\u5b58\u4e0d\u591f&#xff0c;\u5e94\u5347\u7ea7\u5b9e\u4f8b\u914d\u7f6e\u3002<\/p>\n<\/li>\n<h4>4.2 \u63d0\u5347\u7cbe\u5ea6&#xff1a;\u4f7f\u7528 cProfile \u5206\u6790\u51fd\u6570\u7ea7\u6027\u80fd<\/h4>\n<p>\u9664\u4e86\u603b\u8017\u65f6&#xff0c;\u4f60\u8fd8\u60f3\u77e5\u9053\u201c\u5230\u5e95\u662f\u54ea\u4e00\u6b65\u53d8\u5feb\u4e86\u201d\u3002\u8fd9\u65f6\u5c31\u8981\u7528 cProfile\u3002<\/p>\n<p>\u4ee5\u6590\u6ce2\u90a3\u5951\u4e3a\u4f8b&#xff1a;<\/p>\n<p>python -m cProfile -s cumulative fibonacci.py<\/p>\n<p>\u8f93\u51fa\u4f1a\u5217\u51fa\u6240\u6709\u51fd\u6570\u7684\u8c03\u7528\u6b21\u6570\u548c\u8017\u65f6&#xff0c;\u6bd4\u5982&#xff1a;<\/p>\n<p>ncalls  tottime  percall  cumtime  percall filename:lineno(function)<br \/>\n1    0.000    0.000    2.150    2.150 fibonacci.py:1(&lt;module&gt;)<br \/>\n1    2.150    2.150    2.150    2.150 fibonacci.py:3(fib)<\/p>\n<p>\u4f60\u4f1a\u53d1\u73b0&#xff0c;\u5728 3.11 \u4e2d&#xff0c;fib \u51fd\u6570\u7684 cumtime \u660e\u663e\u66f4\u4f4e&#xff0c;\u8bf4\u660e\u9012\u5f52\u8c03\u7528\u672c\u8eab\u7684\u5f00\u9500\u51cf\u5c11\u4e86\u3002<\/p>\n<h4>4.3 \u5e38\u89c1\u95ee\u9898\u4e0e\u89e3\u51b3\u65b9\u6848<\/h4>\n<h5>Q&#xff1a;\u4e3a\u4ec0\u4e48 pyperformance \u62a5\u9519\u201cNo module named &#039;tkinter&#039;\u201d&#xff1f;<\/h5>\n<p>A&#xff1a;\u67d0\u4e9b\u6d4b\u8bd5\u9700\u8981 GUI \u652f\u6301\u3002\u89e3\u51b3\u65b9\u6cd5\u662f\u5b89\u88c5 Tk \u5e93&#xff1a;<\/p>\n<p>sudo apt-get install -y tk-dev<\/p>\n<h5>Q&#xff1a;\u6d4b\u8bd5\u8fc7\u7a0b\u4e2d\u5b9e\u4f8b\u5361\u6b7b\u4e86\u600e\u4e48\u529e&#xff1f;<\/h5>\n<p>A&#xff1a;\u53ef\u80fd\u662f\u5185\u5b58\u4e0d\u8db3\u3002\u5efa\u8bae\u9009\u62e9\u81f3\u5c11 16GB \u5185\u5b58\u7684\u5b9e\u4f8b\u3002\u4e5f\u53ef\u901a\u8fc7 htop \u5b9e\u65f6\u76d1\u63a7\u8d44\u6e90\u4f7f\u7528\u3002<\/p>\n<h5>Q&#xff1a;\u5982\u4f55\u4fdd\u5b58\u6d4b\u8bd5\u7ed3\u679c\u4ee5\u4fbf\u540e\u7eed\u5206\u6790&#xff1f;<\/h5>\n<p>A&#xff1a;\u5c06\u65e5\u5fd7\u91cd\u5b9a\u5411\u5230\u6587\u4ef6&#xff1a;<\/p>\n<p>python bubble_sort.py &gt;&gt; results.log 2&gt;&amp;1<\/p>\n<p>\u6216\u8005\u6253\u5305\u6240\u6709\u7ed3\u679c\u4e0a\u4f20\u5230\u5bf9\u8c61\u5b58\u50a8\u3002<\/p>\n<hr \/>\n<h3>\u603b\u7ed3<\/h3>\n<ul>\n<li>\u4e91\u7aef\u955c\u50cf\u662f\u6027\u4ef7\u6bd4\u6700\u9ad8\u7684\u6d4b\u8bd5\u65b9\u6848&#xff1a;\u65e0\u9700\u6295\u8d44\u786c\u4ef6&#xff0c;1\u5c0f\u65f61\u5757\u94b1\u5c31\u80fd\u83b7\u5f97\u9ad8\u6027\u80fd\u73af\u5883&#xff0c;\u7279\u522b\u9002\u5408\u4e34\u65f6\u6027\u3001\u9ad8\u5f3a\u5ea6\u7684\u6027\u80fd\u9a8c\u8bc1\u4efb\u52a1\u3002<\/li>\n<li>Python 3.11 \u786e\u5b9e\u663e\u8457\u66f4\u5feb&#xff1a;\u5728\u7eaf Python \u8ba1\u7b97\u573a\u666f\u4e0b&#xff08;\u5982\u7b97\u6cd5\u3001\u903b\u8f91\u5904\u7406&#xff09;&#xff0c;\u76f8\u6bd4 3.10 \u5e73\u5747\u63d0\u901f 25%-40%&#xff0c;\u5b98\u65b9\u6570\u636e\u771f\u5b9e\u53ef\u9760\u3002<\/li>\n<li>\u5408\u7406\u9009\u62e9\u6d4b\u8bd5\u65b9\u6cd5\u5f88\u91cd\u8981&#xff1a;\u624b\u5de5\u811a\u672c\u9002\u5408\u6f14\u793a&#xff0c;pyperformance \u66f4\u6743\u5a01&#xff0c;\u771f\u5b9e\u573a\u666f\u6d4b\u8bd5\u5219\u80fd\u53cd\u6620\u7efc\u5408\u8868\u73b0&#xff0c;\u4e09\u8005\u7ed3\u5408\u66f4\u6709\u8bf4\u670d\u529b\u3002<\/li>\n<li>\u63a7\u5236\u53d8\u91cf\u662f\u5173\u952e&#xff1a;\u786e\u4fdd\u6d4b\u8bd5\u73af\u5883\u4e00\u81f4\u3001\u4f9d\u8d56\u76f8\u540c\u3001\u8fd0\u884c\u591a\u6b21\u53d6\u5e73\u5747&#xff0c;\u624d\u80fd\u5f97\u51fa\u53ef\u4fe1\u7ed3\u8bba\u3002<\/li>\n<li>\u73b0\u5728\u5c31\u53ef\u4ee5\u52a8\u624b\u8bd5\u8bd5&#xff1a;\u6574\u4e2a\u6d41\u7a0b\u7b80\u5355\u5230\u4e0d\u53ef\u601d\u8bae&#xff0c;\u70b9\u51e0\u4e0b\u5c31\u80fd\u8dd1\u51fa\u4e13\u4e1a\u7ea7\u6570\u636e&#xff0c;\u5b9e\u6d4b\u975e\u5e38\u7a33\u5b9a\u3002<\/li>\n<\/ul>\n<hr \/>\n<p>\u83b7\u53d6\u66f4\u591aAI\u955c\u50cf<\/p>\n<p>\u60f3\u63a2\u7d22\u66f4\u591aAI\u955c\u50cf\u548c\u5e94\u7528\u573a\u666f&#xff1f;\u8bbf\u95ee CSDN\u661f\u56fe\u955c\u50cf\u5e7f\u573a&#xff0c;\u63d0\u4f9b\u4e30\u5bcc\u7684\u9884\u7f6e\u955c\u50cf&#xff0c;\u8986\u76d6\u5927\u6a21\u578b\u63a8\u7406\u3001\u56fe\u50cf\u751f\u6210\u3001\u89c6\u9891\u751f\u6210\u3001\u6a21\u578b\u5fae\u8c03\u7b49\u591a\u4e2a\u9886\u57df&#xff0c;\u652f\u6301\u4e00\u952e\u90e8\u7f72\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6ca1\u670d\u52a1\u5668\u600e\u4e48\u6d4bPython3.11&#xff1f;\u4e91\u7aefGPU 1\u5c0f\u65f61\u5757\u8f7b\u677e\u8dd1\u5206<br \/>\n\u4f60\u662f\u4e0d\u662f\u4e5f\u9047\u5230\u8fc7\u8fd9\u79cd\u60c5\u51b5&#xff1a;\u60f3\u5199\u4e00\u7bc7\u5173\u4e8e Python 3.11 \u6027\u80fd\u63d0\u5347\u7684\u6280\u672f\u6587\u7ae0&#xff0c;\u5374\u88ab\u81ea\u5bb6\u8001\u6389\u7259\u7684\u7b14\u8bb0\u672c\u5361\u5230\u6000\u7591\u4eba\u751f&#xff1f;\u7f16\u8bd1\u6162\u3001\u6d4b\u8bd5\u5361\u987f\u3001\u8dd1\u4e2a\u57fa\u51c6\u6d4b\u8bd5\u50cf\u5728\u7b49\u5b87\u5b99\u91cd\u542f\u3002\u53bb\u7f51\u5427\u5305\u673a\u5427&#xff0c;\u4e00\u5929\u51e0\u5341\u4e0a\u767e\u4e0d\u8bf4&#xff0c;\u73af\u5883\u8fd8\u4e0d\u5e72\u51c0&#xff0c;\u88c5\u4e2a\u4f9d\u8d56\u90fd\u80fd\u6298\u817e\u534a\u5929\u3002<br \/>\n\u66f4\u5934\u75bc\u7684\u662f&#xff0c;Python \u5b98\u65b9\u8bf4 3.11 \u6bd4 3.10 \u5feb<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"topic":[],"class_list":["post-61523","post","type-post","status-publish","format-standard","hentry","category-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u6ca1\u670d\u52a1\u5668\u600e\u4e48\u6d4bPython3.11\uff1f\u4e91\u7aefGPU 1\u5c0f\u65f61\u5757\u8f7b\u677e\u8dd1\u5206 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/61523.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6ca1\u670d\u52a1\u5668\u600e\u4e48\u6d4bPython3.11\uff1f\u4e91\u7aefGPU 1\u5c0f\u65f61\u5757\u8f7b\u677e\u8dd1\u5206 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6ca1\u670d\u52a1\u5668\u600e\u4e48\u6d4bPython3.11&#xff1f;\u4e91\u7aefGPU 1\u5c0f\u65f61\u5757\u8f7b\u677e\u8dd1\u5206 \u4f60\u662f\u4e0d\u662f\u4e5f\u9047\u5230\u8fc7\u8fd9\u79cd\u60c5\u51b5&#xff1a;\u60f3\u5199\u4e00\u7bc7\u5173\u4e8e Python 3.11 \u6027\u80fd\u63d0\u5347\u7684\u6280\u672f\u6587\u7ae0&#xff0c;\u5374\u88ab\u81ea\u5bb6\u8001\u6389\u7259\u7684\u7b14\u8bb0\u672c\u5361\u5230\u6000\u7591\u4eba\u751f&#xff1f;\u7f16\u8bd1\u6162\u3001\u6d4b\u8bd5\u5361\u987f\u3001\u8dd1\u4e2a\u57fa\u51c6\u6d4b\u8bd5\u50cf\u5728\u7b49\u5b87\u5b99\u91cd\u542f\u3002\u53bb\u7f51\u5427\u5305\u673a\u5427&#xff0c;\u4e00\u5929\u51e0\u5341\u4e0a\u767e\u4e0d\u8bf4&#xff0c;\u73af\u5883\u8fd8\u4e0d\u5e72\u51c0&#xff0c;\u88c5\u4e2a\u4f9d\u8d56\u90fd\u80fd\u6298\u817e\u534a\u5929\u3002 \u66f4\u5934\u75bc\u7684\u662f&#xff0c;Python \u5b98\u65b9\u8bf4 3.11 \u6bd4 3.10 \u5feb\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/61523.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-17T15:05:52+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/61523.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/61523.html\",\"name\":\"\u6ca1\u670d\u52a1\u5668\u600e\u4e48\u6d4bPython3.11\uff1f\u4e91\u7aefGPU 1\u5c0f\u65f61\u5757\u8f7b\u677e\u8dd1\u5206 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-17T15:05:52+00:00\",\"dateModified\":\"2026-01-17T15:05:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/61523.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/61523.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/61523.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6ca1\u670d\u52a1\u5668\u600e\u4e48\u6d4bPython3.11\uff1f\u4e91\u7aefGPU 1\u5c0f\u65f61\u5757\u8f7b\u677e\u8dd1\u5206\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u6ca1\u670d\u52a1\u5668\u600e\u4e48\u6d4bPython3.11\uff1f\u4e91\u7aefGPU 1\u5c0f\u65f61\u5757\u8f7b\u677e\u8dd1\u5206 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/61523.html","og_locale":"zh_CN","og_type":"article","og_title":"\u6ca1\u670d\u52a1\u5668\u600e\u4e48\u6d4bPython3.11\uff1f\u4e91\u7aefGPU 1\u5c0f\u65f61\u5757\u8f7b\u677e\u8dd1\u5206 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6ca1\u670d\u52a1\u5668\u600e\u4e48\u6d4bPython3.11&#xff1f;\u4e91\u7aefGPU 1\u5c0f\u65f61\u5757\u8f7b\u677e\u8dd1\u5206 \u4f60\u662f\u4e0d\u662f\u4e5f\u9047\u5230\u8fc7\u8fd9\u79cd\u60c5\u51b5&#xff1a;\u60f3\u5199\u4e00\u7bc7\u5173\u4e8e Python 3.11 \u6027\u80fd\u63d0\u5347\u7684\u6280\u672f\u6587\u7ae0&#xff0c;\u5374\u88ab\u81ea\u5bb6\u8001\u6389\u7259\u7684\u7b14\u8bb0\u672c\u5361\u5230\u6000\u7591\u4eba\u751f&#xff1f;\u7f16\u8bd1\u6162\u3001\u6d4b\u8bd5\u5361\u987f\u3001\u8dd1\u4e2a\u57fa\u51c6\u6d4b\u8bd5\u50cf\u5728\u7b49\u5b87\u5b99\u91cd\u542f\u3002\u53bb\u7f51\u5427\u5305\u673a\u5427&#xff0c;\u4e00\u5929\u51e0\u5341\u4e0a\u767e\u4e0d\u8bf4&#xff0c;\u73af\u5883\u8fd8\u4e0d\u5e72\u51c0&#xff0c;\u88c5\u4e2a\u4f9d\u8d56\u90fd\u80fd\u6298\u817e\u534a\u5929\u3002 \u66f4\u5934\u75bc\u7684\u662f&#xff0c;Python \u5b98\u65b9\u8bf4 3.11 \u6bd4 3.10 \u5feb","og_url":"https:\/\/www.wsisp.com\/helps\/61523.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-17T15:05:52+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/61523.html","url":"https:\/\/www.wsisp.com\/helps\/61523.html","name":"\u6ca1\u670d\u52a1\u5668\u600e\u4e48\u6d4bPython3.11\uff1f\u4e91\u7aefGPU 1\u5c0f\u65f61\u5757\u8f7b\u677e\u8dd1\u5206 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-17T15:05:52+00:00","dateModified":"2026-01-17T15:05:52+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/61523.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/61523.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/61523.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u6ca1\u670d\u52a1\u5668\u600e\u4e48\u6d4bPython3.11\uff1f\u4e91\u7aefGPU 1\u5c0f\u65f61\u5757\u8f7b\u677e\u8dd1\u5206"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/61523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=61523"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/61523\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=61523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=61523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=61523"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=61523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}