{"id":57,"date":"2023-07-13T14:03:18","date_gmt":"2023-07-13T06:03:18","guid":{"rendered":"https:\/\/blog.calg.eu.org\/?p=57"},"modified":"2023-07-13T14:03:18","modified_gmt":"2023-07-13T06:03:18","slug":"python%e5%a4%9a%e4%b8%aa%e7%89%88%e6%9c%ac%e5%85%b1%e5%ad%98%e9%85%8d%e7%bd%ae%e7%8e%af%e5%a2%83%e5%8f%98%e9%87%8f","status":"publish","type":"post","link":"https:\/\/blog.cccl.eu.org\/?p=57","title":{"rendered":"python\u591a\u4e2a\u7248\u672c\u5171\u5b58\u914d\u7f6e\u73af\u5883\u53d8\u91cf"},"content":{"rendered":"<p><span style=\"color: #ff0000;\">\u672c\u6587\u4e3b\u8981\u8bf4\u660e\u5982\u4f55\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u9ed8\u8ba4\u60a8\u5df2\u7ecf\u4e0b\u8f7d\u597d\u4e862\u4e2a\u7248\u672c\u7684Python\u3002<\/span><\/p>\n<pre class=\"prettyprint linenums\" ><span style=\"color: #000000;\">\u7b2c\u4e00\u6b65<\/span><\/pre>\n<p><span style=\"color: #000000;\">\u627e\u5230\u60a8\u7684\u4e24\u4e2a\u7248\u672c\u7684python\u8def\u5f84\uff0c\u5c06\u4ed6\u4eec\u6dfb\u52a0\u5230\u73af\u5883\u53d8\u91cf\u4e2d\u3002\u5982\u679c\u60a8\u4e0d\u4e86\u89e3\u5982\u4f55\u6dfb\u52a0\u73af\u5883\u53d8\u91cf\uff0c\u8bf7\u53c2\u8003\u6b64\u8fde\u63a5\uff1ahttps:\/\/blog.csdn.net\/xue_nuo\/article\/details\/114793534<\/span><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/blog.calg.eu.org\/wp-content\/uploads\/2023\/07\/20230713134459-285x300.png\" alt=\"\" \/><\/p>\n<p>\u6dfb\u52a0\u5b8c\u6210\u540e\uff0c\u5e94\u8be5\u662f\u4e0a\u56fe\u8fd9\u6837\u7684\u6548\u679c\u3002<\/p>\n<pre class=\"prettyprint linenums\" >\u7b2c\u4e8c\u6b65<\/pre>\n<p>\u7ed9\u5176\u4e2d\u4e00\u4e2a\u7248\u672c\u6539\u540d\uff0c\u6211\u662f\u5b89\u88c5\u4e86Python 3.10 \u548c python 3.8 \uff0c\u6240\u4ee5\u6211\u6539\u4e86python3.8\u7684\u540d\u79f0\uff0cpython 3.10 \u4fdd\u6301\u539f\u540d\u4e0d\u53d8\u3002<\/p>\n<p>\u6ce8\u610f\u5728\u6539\u540d\u65f6\u4e0d\u8981\u76f4\u63a5\u4fee\u6539python.exe\u7684\u540d\u79f0\uff0c\u9700\u8981\u5148\u590d\u5236\u4e00\u4e2aexe\u6587\u4ef6\uff0c\u7136\u540e\u4fee\u6539\u8fd9\u4e2a\u6587\u4ef6\u7684\u540d\u79f0\uff0c\u5982\u4e0b\u56fe\uff1a<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-59\" src=\"https:\/\/blog.calg.eu.org\/wp-content\/uploads\/2023\/07\/2-300x221.png\" alt=\"\" srcset=\"https:\/\/blog.cccl.eu.org\/wp-content\/uploads\/2023\/07\/2-300x221.png 300w, https:\/\/blog.cccl.eu.org\/wp-content\/uploads\/2023\/07\/2.png 642w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<pre class=\"prettyprint linenums\" >\u7b2c\u4e09\u6b65 \u5982\u4f55\u8fd0\u884c\u5462\uff1f<\/pre>\n<p>\u60f3\u8981\u8fd0\u884cpython 3.10\u76f4\u63a5\u5728\u547d\u4ee4\u884c\u8f93\u5165python\u8fd0\u884c\uff0c\u60f3\u8981python 3.8 \u5219\u9700\u8981\u8f93\u5165 python3.8<\/p>\n<p>\u56e0\u4e3apip\u662f\u81ea\u5e26pip3.8.exe\u6587\u4ef6\u7684\uff0c\u56e0\u6b64\u4e0d\u9700\u8981\u4fee\u6539pip.exe\u7684\u540d\u79f0\u3002<\/p>\n<p><code>python3.8 -m virtualenv .venv  # \u4f7f\u7528 3.8 \u7248\u672c\u521b\u5efa\u865a\u62df\u73af\u5883<\/code><\/p>\n<p><code>python -m virtualenv .venv2 # \u4f7f\u7528 3.10 \u7248\u672c\u521b\u5efa\u865a\u62df\u73af\u5883<\/code><\/p>\n<p># \u5982\u679c\u8981\u8fd0\u884c\u5176\u4ed6\u7684\u5305\uff0c\u5219\u9700\u8981\u628a \u201cvirtualenv\u201d \u6539\u6210\u4f60\u60f3\u8981\u8fd0\u884c\u7684\u5305\u540d\u79f0\u5c31\u53ef\u4ee5\u4e86<\/p>\n<p>\u4f7f\u7528\u56fe\u7247\u793a\u4f8b\uff1a<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-60\" src=\"https:\/\/blog.calg.eu.org\/wp-content\/uploads\/2023\/07\/3-300x195.png\" alt=\"\" srcset=\"https:\/\/blog.cccl.eu.org\/wp-content\/uploads\/2023\/07\/3-300x195.png 300w, https:\/\/blog.cccl.eu.org\/wp-content\/uploads\/2023\/07\/3-768x500.png 768w, https:\/\/blog.cccl.eu.org\/wp-content\/uploads\/2023\/07\/3.png 883w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u5982\u679c\u6709\u4ec0\u4e48\u6ca1\u6709\u7406\u89e3\u7684\uff0c\u53ef\u4ee5\u5728\u4e0b\u65b9\u7559\u8a00\uff0c\u611f\u8c22\u9605\u8bfb\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u6587\u4e3b\u8981\u8bf4\u660e\u5982\u4f55\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u9ed8\u8ba4\u60a8\u5df2\u7ecf\u4e0b\u8f7d\u597d\u4e862\u4e2a\u7248\u672c\u7684Python\u3002 \u7b2c\u4e00\u6b65 \u627e\u5230\u60a8\u7684\u4e24\u4e2a\u7248\u672c\u7684python\u8def\u5f84\uff0c\u5c06\u4ed6\u4eec\u6dfb\u52a0\u5230\u73af\u5883\u53d8\u91cf\u4e2d\u3002\u5982\u679c\u60a8\u4e0d\u4e86\u89e3\u5982\u4f55\u6dfb\u52a0\u73af\u5883\u53d8\u91cf\uff0c\u8bf7\u53c2\u8003\u6b64\u8fde\u63a5\uff1ahttps:\/\/blog.csdn.net\/xue_nuo\/article\/details\/114793534 \u6dfb\u52a0\u5b8c\u6210\u540e\uff0c\u5e94\u8be5\u662f\u4e0a\u56fe\u8fd9\u6837\u7684\u6548\u679c\u3002 \u7b2c\u4e8c\u6b65 \u7ed9\u5176\u4e2d\u4e00\u4e2a\u7248\u672c\u6539\u540d\uff0c\u6211\u662f\u5b89\u88c5\u4e86Python 3.10 \u548c  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":60,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"views":377,"_links":{"self":[{"href":"https:\/\/blog.cccl.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/57"}],"collection":[{"href":"https:\/\/blog.cccl.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.cccl.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.cccl.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.cccl.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=57"}],"version-history":[{"count":1,"href":"https:\/\/blog.cccl.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/57\/revisions"}],"predecessor-version":[{"id":61,"href":"https:\/\/blog.cccl.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/57\/revisions\/61"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.cccl.eu.org\/index.php?rest_route=\/wp\/v2\/media\/60"}],"wp:attachment":[{"href":"https:\/\/blog.cccl.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.cccl.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.cccl.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}