{"id":119505,"date":"2026-10-29T21:01:18","date_gmt":"2026-10-29T13:01:18","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/119505.html"},"modified":"2026-10-29T21:01:18","modified_gmt":"2026-10-29T13:01:18","slug":"%e4%bb%8e-anaconda-%e8%bf%81%e7%a7%bb%e8%87%b3-miniforge-%e6%9e%81%e7%ae%80%e5%ae%9e%e6%88%98%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/119505.html","title":{"rendered":"\u4ece Anaconda \u8fc1\u79fb\u81f3 Miniforge \u6781\u7b80\u5b9e\u6218\u6307\u5357"},"content":{"rendered":"<h2>&#x1f4dd; \u5408\u89c4\u907f\u9669&#xff1a;\u4ece Anaconda \u8fc1\u79fb\u81f3 Miniforge \u6781\u7b80\u5b9e\u6218\u6307\u5357<\/h2>\n<p>\u6458\u8981 \u968f\u7740\u5f00\u6e90\u8bb8\u53ef\u5408\u89c4\u6027\u5ba1\u8ba1\u6536\u7d27&#xff0c;\u4f17\u591a\u5927\u578b\u4f01\u4e1a&#xff08;\u8d85200\u4eba&#xff09;\u7eb7\u7eb7\u52a0\u901f\u63a8\u8fdb\u4ece Anaconda \u5411 100% \u514d\u8d39\u5f00\u6e90\u3001\u57fa\u4e8e conda-forge \u793e\u533a\u6258\u7ba1\u7684 Miniforge \u7684\u73af\u5883\u8fc1\u79fb\u3002\u672c\u6587\u5c06\u7b80\u8ff0\u8fd9\u4e00\u6ce2\u8fc1\u79fb\u7684\u6df1\u5c42\u80cc\u666f&#xff0c;\u5e76\u5206\u4eab\u5728\u8fc1\u79fb\u8fc7\u7a0b\u4e2d\u5982\u4f55\u65e0\u7f1d\u4fdd\u7559\u548c\u8fc1\u79fb\u672c\u5730\u539f\u6709\u7684\u865a\u62df\u73af\u5883&#xff0c;\u907f\u5f00\u8fc1\u79fb\u540e\u5e38\u89c1\u7684 bad interpreter \/ bad path \u4f9d\u8d56\u62a5\u9519\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001 \u8fc1\u79fb\u80cc\u666f&#xff1a;\u5927\u5382\u4e3a\u4f55\u52a0\u901f Phase out Anaconda&#xff1f;<\/h3>\n<li>\u5927\u89c4\u6a21\u5546\u4e1a\u5ba1\u8ba1\u4e0e\u9ad8\u989d\u7f5a\u6b3e\u98ce\u9669&#xff1a; \u81ea 2020 \u5e74\u8d77&#xff0c;Anaconda \u4fee\u6539\u4e86\u670d\u52a1\u6761\u6b3e&#xff08;TOS&#xff09;&#xff0c;\u89c4\u5b9a&#xff1a;\u5458\u5de5\u6570\u8d85\u8fc7 200 \u4eba\u7684\u5546\u4e1a\u673a\u6784\u5728\u529e\u516c\u7535\u8111\u4e0a\u4f7f\u7528 Anaconda \u53ca\u5176\u9ed8\u8ba4\u7684 defaults \u901a\u9053&#xff0c;\u5fc5\u987b\u8d2d\u4e70\u4ed8\u8d39\u5546\u4e1a\u6388\u6743\u3002\u8fd1\u5e74\u6765\u5176\u6cd5\u52a1\u90e8\u95e8\u9891\u7e41\u9488\u5bf9\u8de8\u56fd\u4f01\u4e1a\u5c55\u5f00\u4e0b\u8f7d\u6d41\u91cf IP \u5ba1\u8ba1\u5e76\u53d1\u9001\u9ad8\u989d\u8d26\u5355&#xff0c;\u4f01\u4e1a\u9762\u4e34\u5de8\u5927\u7684\u8d22\u52a1\u4e0e\u6cd5\u5f8b\u5408\u89c4\u98ce\u9669\u3002<\/li>\n<li>Miniforge \u6210\u4e3a\u5b8c\u7f8e\u5f00\u6e90\u5e73\u66ff&#xff1a; Miniforge \u7531 GitHub \u793e\u533a\u4e3b\u5bfc\u5e76\u6258\u7ba1&#xff0c;\u5176\u9ed8\u8ba4\u4e0b\u8f7d\u6e90\u4e3a conda-forge\u3002\u8be5\u901a\u9053\u5b8c\u5168\u5f00\u6e90\u514d\u8d39\u4e14\u5bf9\u5546\u4e1a\u5316\u53cb\u597d&#xff0c;\u80fd\u5f7b\u5e95\u89c4\u907f\u5546\u4e1a\u8bb8\u53ef\u9677\u9631\u3002\u6b64\u5916&#xff0c;\u5176\u4f53\u79ef\u4ec5 50MB \u5de6\u53f3&#xff0c;\u6781\u5176\u8f7b\u91cf&#xff0c;\u4e0d\u6613\u4ea7\u751f\u201c\u8f6f\u4ef6\u81a8\u80c0\u201d\u548c\u5b89\u5168\u6f0f\u6d1e\u653b\u51fb\u3002<\/li>\n<hr \/>\n<h3>\u4e8c\u3001 \u8fc1\u79fb\u524d\u4e09\u6b65<\/h3>\n<h4>\u7b2c 1 \u6b65&#xff1a;\u5907\u4efd\u5e76\u91cd\u547d\u540d\u65e7 Anaconda \u76ee\u5f55&#xff08;\u8ba9\u5176\u5931\u6548&#xff09;<\/h4>\n<p>\u4e3a\u4e86\u9632\u6b62\u5378\u8f7d\u8fc7\u7a0b\u610f\u5916\u7269\u7406\u62b9\u9664\u5458\u5de5\u5df2\u6709\u7684\u865a\u62df\u73af\u5883\u6587\u4ef6\u5939&#xff0c;\u6700\u5b89\u5168\u4e14\u6700\u4fdd\u9669\u7684\u505a\u6cd5\u662f\u76f4\u63a5\u901a\u8fc7\u91cd\u547d\u540d\u4f7f\u5176\u5931\u6548\u5e76\u4f5c\u4e3a\u5907\u4efd&#xff1a;<\/p>\n<ul>\n<li>Linux \u5907\u4efd&#xff1a;<span class=\"token function\">mv<\/span> \/root\/anaconda3 \/root\/anaconda3_old\n <\/li>\n<li>Windows \u5907\u4efd&#xff1a; \u5c06 C:\\\\Users\\\\&lt;YourName&gt;\\\\anaconda3 \u91cd\u547d\u540d\u4e3a C:\\\\Users\\\\&lt;YourName&gt;\\\\anaconda3_old\u3002<\/li>\n<\/ul>\n<h4>\u7b2c 2 \u6b65&#xff1a;\u4e0b\u8f7d\u5e76\u5b89\u88c5 Miniforge<\/h4>\n<p>\u524d\u5f80 Miniforge \u5b98\u65b9 GitHub \u4ed3\u5e93 \u4e0b\u8f7d\u5bf9\u5e94\u67b6\u6784\u7684\u6700\u65b0\u5b89\u88c5\u5305\u5e76\u8fd0\u884c\u3002<\/p>\n<h4>\u7b2c 3 \u6b65&#xff1a;\u914d\u7f6e\u9ed8\u8ba4\u5168\u5c40\u5b89\u5168\u6e90<\/h4>\n<p>\u5728\u7528\u6237\u76ee\u5f55\u4e0b\u7f16\u8f91\u6216\u521b\u5efa .condarc&#xff0c;\u5c4f\u853d\u5b98\u65b9\u5546\u4e1a\u6e90&#xff0c;\u4ec5\u5141\u8bb8 conda-forge&#xff1a;<\/p>\n<p><span class=\"token key atrule\">channels<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token punctuation\">&#8211;<\/span> conda<span class=\"token punctuation\">&#8211;<\/span>forge<br \/>\n<span class=\"token key atrule\">show_channel_urls<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token boolean important\">true<\/span><br \/>\n<span class=\"token key atrule\">default_channels<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span> <span class=\"token comment\"># \u5f3a\u5236\u6e05\u7a7a\u9ed8\u8ba4defaults\u901a\u9053&#xff0c;\u9632\u6b62\u7531\u4e8e\u8bef\u62c9\u53d6\u89e6\u53d1\u6cd5\u52a1\u5ba1\u8ba1<\/span><\/p>\n<hr \/>\n<h3>\u4e09\u3001 &#x1f525; \u7b2c 4 \u6b65\u7740\u91cd\u653b\u575a&#xff1a;\u73af\u5883\u65e0\u7f1d\u8fc1\u79fb\u4e0e\u907f\u5751\u4fee\u590d&#xff08;\u53cc\u7cfb\u7edf\u5b9e\u6218&#xff09;<\/h3>\n<p>\u642c\u8fc1\u5b8c Miniforge \u540e&#xff0c;\u5982\u4f55\u5b8c\u6574\u201c\u5ac1\u63a5\u201d\u5e76\u6fc0\u6d3b\u65e7\u865a\u62df\u73af\u5883\u4e0b\u7684\u6240\u6709\u7b2c\u4e09\u65b9\u5305&#xff0c;\u5e76\u907f\u514d\u7531\u4e8e\u65e7\u8def\u5f84\u786c\u7f16\u7801\u5bfc\u81f4\u7684\u62a5\u9519&#xff1f;\u8bf7\u6839\u636e\u60a8\u7684\u64cd\u4f5c\u7cfb\u7edf\u9009\u62e9\u5bf9\u5e94\u7684\u4fee\u590d\u65b9\u6848&#xff1a;<\/p>\n<hr \/>\n<h4>&#x1f427; \u65b9\u6848 A&#xff1a;Linux \u7cfb\u7edf\u4e0b\u7684\u8fc1\u79fb\u4e0e\u4fee\u590d<\/h4>\n<p>\u5728 Linux \u4e0b&#xff0c;\u7269\u7406\u590d\u5236\u865a\u62df\u73af\u5883\u540e&#xff0c;pip \u7b49\u53ef\u6267\u884c\u811a\u672c\u4f1a\u56e0\u4e3a\u786c\u7f16\u7801\u4e86\u65e7\u7684 Python \u8def\u5f84\u800c\u62a5 bad interpreter \u9519\u8bef\u3002<\/p>\n<h5>1. \u7269\u7406\u590d\u5236\u865a\u62df\u73af\u5883<\/h5>\n<p>\u76f4\u63a5\u5c06\u539f Anaconda \u5907\u4efd\u76ee\u5f55\u4e0b\u7684\u865a\u62df\u73af\u5883\u6587\u4ef6\u5939&#xff0c;\u590d\u5236\u5230\u65b0 Miniforge \u5b89\u88c5\u76ee\u5f55\u4e0b&#xff1a;<\/p>\n<p><span class=\"token function\">cp<\/span> <span class=\"token parameter variable\">-r<\/span> \/root\/anaconda3_old\/envs\/* \/data\/miniforge3\/envs\/<\/p>\n<h5>2. \u4fee\u590d pip \u53ca\u547d\u4ee4\u884c\u5de5\u5177\u7684 bad interpreter \u9519\u8bef<\/h5>\n<p>\u5728\u7269\u7406\u642c\u8fc1\u865a\u62df\u73af\u5883\u540e&#xff0c;\u5f53\u60a8\u6fc0\u6d3b\u65b0\u73af\u5883\u5e76\u8fd0\u884c pip \u65f6&#xff0c;\u5f80\u5f80\u4f1a\u76f4\u63a5\u9047\u5230\u4ee5\u4e0b\u9519\u8bef&#xff1a;<\/p>\n<p><span class=\"token punctuation\">(<\/span>ai_env<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">[<\/span>user&#064;gpu project<span class=\"token punctuation\">]<\/span><span class=\"token comment\"># pip show requests<\/span><br \/>\nbash: \/data\/miniforge3\/envs\/ai_env\/bin\/pip: \/root\/anaconda3\/envs\/ai_env\/bin\/python3.10: bad interpreter: No such <span class=\"token function\">file<\/span> or directory<\/p>\n<ul>\n<li>\n<p>\u539f\u56e0\u5206\u6790&#xff1a; \u590d\u5236\u8fc7\u6765\u7684 pip \u53ef\u6267\u884c\u6587\u4ef6\u5728\u7b2c\u4e00\u884c&#xff08;Shebang \u884c&#xff09;\u4e2d&#xff0c;\u786c\u7f16\u7801\u4e86\u539f anaconda3 \u7684 Python \u8def\u5f84\u3002\u5f53 Anaconda \u76ee\u5f55\u88ab\u6539\u540d\u6216\u5220\u9664\u540e&#xff0c;pip \u4fbf\u627e\u4e0d\u5230\u539f Python \u89e3\u91ca\u5668\u3002<\/p>\n<\/li>\n<li>\n<p>&#x1f6e0;\ufe0f \u89e3\u51b3\u65b9\u6848&#xff08;Shebang \u4fee\u590d\u6cd5&#xff09;&#xff1a;<\/p>\n<li>\u8fd0\u884c which pip \u83b7\u53d6\u5176\u5728\u65b0 Miniforge \u4e2d\u7684\u771f\u5b9e\u7269\u7406\u8def\u5f84&#xff1a;\/data\/miniforge3\/envs\/ai_env\/bin\/pip\n <\/li>\n<li>\u4f7f\u7528 vim \u6216\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u8be5 pip \u6587\u4ef6&#xff1a;<span class=\"token function\">vim<\/span> \/data\/miniforge3\/envs\/ai_env\/bin\/pip<br \/>\n \u4fee\u6539\u524d\u7684\u5185\u5bb9&#xff08;\u7b2c\u4e00\u884c&#xff09;&#xff1a;<span class=\"token comment\">#!\/root\/anaconda3\/envs\/ai_env\/bin\/python3.10<\/span><br \/>\n \u4fee\u6539\u540e\u7684\u5185\u5bb9&#xff08;\u5c06\u8def\u5f84\u6307\u5411\u65b0 Miniforge \u4e0b\u7684 Python&#xff09;&#xff1a;<span class=\"token comment\">#!\/data\/miniforge3\/envs\/ai_env\/bin\/python3.10<\/span><br \/>\n \u4fdd\u5b58\u5e76\u9000\u51fa&#xff08;:wq&#xff09;\u3002\u518d\u6b21\u8fd0\u884c pip&#xff0c;\u73af\u5883\u5373\u53ef\u5b8c\u7f8e\u590d\u6d3b&#xff01;<\/li>\n<\/li>\n<\/ul>\n<hr \/>\n<h4>&#x1fa9f; \u65b9\u6848 B&#xff1a;Windows \u7cfb\u7edf\u4e0b\u7684\u8fc1\u79fb\u4e0e\u4fee\u590d<\/h4>\n<p>\u5728 Windows \u73af\u5883\u4e0b&#xff0c;Conda \u865a\u62df\u73af\u5883\u7684\u8f6c\u79fb\u548c\u4fee\u590d\u903b\u8f91\u6709\u6240\u4e0d\u540c\u3002\u56e0\u4e3a Windows \u4e0d\u4f7f\u7528 Shebang&#xff0c;\u800c\u662f\u901a\u8fc7 Scripts \u76ee\u5f55\u4e0b\u7684\u53ef\u6267\u884c\u542f\u52a8\u5668&#xff08;\u5982 pip.exe&#xff09;\u5185\u90e8\u786c\u7f16\u7801\u7684\u8def\u5f84\u8fdb\u884c\u89e3\u6790\u3002<\/p>\n<h5>1. \u7269\u7406\u590d\u5236\u865a\u62df\u73af\u5883<\/h5>\n<p>\u5c06\u5907\u4efd\u76ee\u5f55\u4e2d\u7684\u865a\u62df\u73af\u5883&#xff0c;\u76f4\u63a5\u7269\u7406\u590d\u5236\u5230 Miniforge \u76ee\u5f55\u4e0b&#xff1a;<\/p>\n<ul>\n<li>\u6e90\u8def\u5f84&#xff1a;C:\\\\Users\\\\&lt;Name&gt;\\\\anaconda3_old\\\\envs\\\\&lt;env_name&gt;<\/li>\n<li>\u76ee\u6807\u8def\u5f84&#xff1a;C:\\\\Users\\\\&lt;Name&gt;\\\\miniforge3\\\\envs\\\\&lt;env_name&gt;<\/li>\n<\/ul>\n<h5>2. \u4fee\u590d Scripts \u76ee\u5f55\u4e0b .exe \u5de5\u5177\u5931\u6548\u95ee\u9898 (Bad Path \u4fee\u590d)<\/h5>\n<p>\u5728 Windows \u4e2d&#xff0c;\u5f53\u60a8\u7269\u7406\u590d\u5236\u4e86\u73af\u5883\u540e&#xff0c;\u7531\u4e8e pip.exe\u3001ipython.exe \u7b49\u53ef\u6267\u884c\u6587\u4ef6\u5185\u90e8\u786c\u7f16\u7801\u7ed1\u5b9a\u4e86\u6700\u521d\u5b89\u88c5\u5b83\u4eec\u7684\u90a3\u4e2a\u65e7 python.exe \u8def\u5f84&#xff0c;\u4e00\u65e6\u539f\u8def\u5f84\u5931\u6548&#xff0c;\u5b83\u4eec\u5c31\u4f1a\u5f7b\u5e95\u7f62\u5de5\u3002<\/p>\n<ul>\n<li>&#x1f6e0;\ufe0f \u89e3\u51b3\u65b9\u6848&#xff08;\u5f3a\u529b\u91cd\u6784\u6cd5&#xff09;&#xff1a;\n<li>\u6253\u5f00 Miniforge Prompt&#xff08;\u6216\u6fc0\u6d3b\u4e86 Conda \u73af\u5883\u53d8\u91cf\u7684\u547d\u4ee4\u884c&#xff09;&#xff0c;\u6fc0\u6d3b\u5df2\u8fc1\u79fb\u7684\u76ee\u6807\u865a\u62df\u73af\u5883&#xff1a;conda activate C:\\\\Users\\\\&lt;YourName&gt;\\\\miniforge3\\\\envs\\\\&lt;env_name&gt;\n <\/li>\n<li>\u5f3a\u5236\u8ba9\u73af\u5883\u4f7f\u7528\u5f53\u524d\u65b0\u8def\u5f84\u7684 python.exe \u91cd\u65b0\u5b89\u88c5\/\u66f4\u65b0 pip&#xff1a;python -m pip install &#8211;upgrade &#8211;force-reinstall pip\n<ul>\n<li>\u4e3a\u4ec0\u4e48\u8fd9\u7ba1\u7528&#xff1a;\u6b64\u547d\u4ee4\u4f1a\u5f3a\u5236 Python \u5728\u5f53\u524d\u73af\u5883\u4e0b\u91cd\u65b0\u7f16\u8bd1\u5e76\u8f93\u51fa\u6240\u6709\u7684 .exe \u542f\u52a8\u7a0b\u5e8f&#xff0c;\u5185\u90e8\u7684\u8def\u5f84\u4f1a\u81ea\u52a8\u66f4\u65b0\u4e3a\u6700\u65b0\u7684 C:\\\\Users\\\\&lt;YourName&gt;\\\\miniforge3\\\\envs\\\\&lt;env_name&gt;\\\\python.exe&#xff0c;\u5b8c\u7f8e\u89e3\u51b3\u7531\u4e8e\u7269\u7406\u642c\u8fc1\u5e26\u6765\u7684\u8def\u5f84\u6b7b\u9501\u3002<\/li>\n<\/ul>\n<\/li>\n<\/li>\n<\/ul>\n<h5>3. \u6279\u91cf\u4fee\u6539 .bat \u811a\u672c\u4e2d\u7684\u786c\u7f16\u7801\u65e7\u8def\u5f84<\/h5>\n<p>\u6709\u4e9b\u7b2c\u4e09\u65b9\u5e93\u4f1a\u5728 Scripts \u76ee\u5f55\u4e0b\u751f\u6210 .bat \u6216 .ps1 \u542f\u52a8\u811a\u672c\u3002\u6211\u4eec\u9700\u8981\u8fd0\u884c\u8fd9\u6bb5\u6781\u7b80\u7684 Python \u811a\u672c&#xff0c;\u77ac\u95f4\u81ea\u52a8\u5b8c\u6210\u5168\u91cf\u66ff\u6362&#xff1a;<\/p>\n<p><span class=\"token keyword\">import<\/span> os<\/p>\n<p><span class=\"token comment\"># \u5b9a\u4e49\u60a8\u8fc1\u79fb\u524d\u540e\u7684\u771f\u5b9e\u8def\u5f84<\/span><br \/>\nold_path <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">r&#034;C:\\\\Users\\\\YourName\\\\anaconda3_old\\\\envs\\\\my_env&#034;<\/span><br \/>\nnew_path <span class=\"token operator\">&#061;<\/span> <span class=\"token string\">r&#034;C:\\\\Users\\\\YourName\\\\miniforge3\\\\envs\\\\my_env&#034;<\/span><\/p>\n<p>scripts_dir <span class=\"token operator\">&#061;<\/span> os<span class=\"token punctuation\">.<\/span>path<span class=\"token punctuation\">.<\/span>join<span class=\"token punctuation\">(<\/span>new_path<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;Scripts&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p><span class=\"token keyword\">for<\/span> filename <span class=\"token keyword\">in<\/span> os<span class=\"token punctuation\">.<\/span>listdir<span class=\"token punctuation\">(<\/span>scripts_dir<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    file_path <span class=\"token operator\">&#061;<\/span> os<span class=\"token punctuation\">.<\/span>path<span class=\"token punctuation\">.<\/span>join<span class=\"token punctuation\">(<\/span>scripts_dir<span class=\"token punctuation\">,<\/span> filename<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> filename<span class=\"token punctuation\">.<\/span>endswith<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#039;.bat&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;.ps1&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token keyword\">try<\/span><span class=\"token punctuation\">:<\/span><br \/>\n            <span class=\"token keyword\">with<\/span> <span class=\"token builtin\">open<\/span><span class=\"token punctuation\">(<\/span>file_path<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;r&#039;<\/span><span class=\"token punctuation\">,<\/span> encoding<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#039;utf-8&#039;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">as<\/span> f<span class=\"token punctuation\">:<\/span><br \/>\n                content <span class=\"token operator\">&#061;<\/span> f<span class=\"token punctuation\">.<\/span>read<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n            <span class=\"token keyword\">if<\/span> old_path <span class=\"token keyword\">in<\/span> content<span class=\"token punctuation\">:<\/span><br \/>\n                <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;\u6b63\u5728\u4fee\u590d\u811a\u672c: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>filename<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><br \/>\n                new_content <span class=\"token operator\">&#061;<\/span> content<span class=\"token punctuation\">.<\/span>replace<span class=\"token punctuation\">(<\/span>old_path<span class=\"token punctuation\">,<\/span> new_path<span class=\"token punctuation\">)<\/span><br \/>\n                <span class=\"token keyword\">with<\/span> <span class=\"token builtin\">open<\/span><span class=\"token punctuation\">(<\/span>file_path<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#039;w&#039;<\/span><span class=\"token punctuation\">,<\/span> encoding<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#039;utf-8&#039;<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">as<\/span> f<span class=\"token punctuation\">:<\/span><br \/>\n                    f<span class=\"token punctuation\">.<\/span>write<span class=\"token punctuation\">(<\/span>new_content<span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token keyword\">except<\/span> Exception <span class=\"token keyword\">as<\/span> e<span class=\"token punctuation\">:<\/span><br \/>\n            <span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string-interpolation\"><span class=\"token string\">f&#034;\u8df3\u8fc7\u6587\u4ef6 <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>filename<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">: <\/span><span class=\"token interpolation\"><span class=\"token punctuation\">{<\/span>e<span class=\"token punctuation\">}<\/span><\/span><span class=\"token string\">&#034;<\/span><\/span><span class=\"token punctuation\">)<\/span><\/p>\n<hr \/>\n<h3>\u56db\u3001 &#x1f3af; \u7ecf\u9a8c\u603b\u7ed3\u4e0e\u6700\u4f73\u5b9e\u8df5<\/h3>\n<li>\u4e0d\u8981\u8f7b\u6613\u5168\u5c40\u7edf\u914d no_proxy&#xff1a; \u5728\u5927\u578b\u4f01\u4e1a\u5185\u7f51\u4e2d&#xff0c;\u4f7f\u7528 .company.com \u7edf\u914d\u514d\u4ee3\u7406\u4f1a\u5bfc\u81f4\u9700\u8981\u901a\u8fc7\u4ee3\u7406\u51fa\u53e3\u7684\u5b89\u5168\u533a\u7f51\u7ad9\u65e0\u6cd5\u8bbf\u95ee\u3002\u5e94\u5c3d\u91cf\u7ec6\u5316\u514d\u4ee3\u7406\u767d\u540d\u5355\u3002<\/li>\n<li>\u591a\u8d26\u53f7\u7ba1\u7406\u9996\u9009\u65e0\u75d5\u6c99\u7bb1&#xff1a; \u901a\u8fc7 browser.new_context() \u673a\u5236\u5efa\u7acb\u591a\u5957 state.json&#xff08;\u5982 user_state.json \/ admin_state.json&#xff09;&#xff0c;\u5b83\u4eec\u5728\u8fd0\u884c\u671f\u95f4\u7684\u5185\u7f51\u4f1a\u8bdd\u7edd\u4e0d\u51b2\u7a81\u3001\u4e92\u76f8\u72ec\u7acb\u3002<\/li>\n<li>\u7ed3\u5408 SSO NTLM \u539f\u751f\u81ea\u52a8\u54cd\u5e94&#xff1a; \u5728 Context \u521d\u59cb\u5316\u65f6\u4e00\u5e76\u914d\u7f6e http_credentials \u5c5e\u6027\u3002\u8fd9\u662f\u5bf9\u4f01\u4e1a\u7ea7\u8eab\u4efd\u9a8c\u8bc1\u573a\u666f\u4e0b\u6700\u575a\u56fa\u7684\u201c\u62a4\u822a\u7b56\u7565\u201d\u3002<\/li>\n","protected":false},"excerpt":{"rendered":"<p>&#x1f4dd; \u5408\u89c4\u907f\u9669&#xff1a;\u4ece Anaconda \u8fc1\u79fb\u81f3 Miniforge \u6781\u7b80\u5b9e\u6218\u6307\u5357 \u6458\u8981 \u968f\u7740\u5f00\u6e90\u8bb8\u53ef\u5408\u89c4\u6027\u5ba1\u8ba1\u6536\u7d27&#xff0c;\u4f17\u591a\u5927\u578b\u4f01\u4e1a&#xff08;\u8d85200\u4eba&#xff09;\u7eb7\u7eb7\u52a0\u901f\u63a8\u8fdb\u4ece Anaconda \u5411 100% \u514d\u8d39\u5f00\u6e90\u3001\u57fa\u4e8e conda-forge \u793e\u533a\u6258\u7ba1\u7684 Miniforge \u7684\u73af\u5883\u8fc1\u79fb\u3002\u672c\u6587\u5c06\u7b80\u8ff0\u8fd9\u4e00\u6ce2\u8fc1\u79fb\u7684\u6df1\u5c42\u80cc\u666f&#xff0c;\u5e76\u5206\u4eab\u5728\u8fc1\u79fb\u8fc7\u7a0b\u4e2d\u5982\u4f55\u65e0\u7f1d\u4fdd\u7559\u548c\u8fc1\u79fb\u672c\u5730\u539f\u6709\u7684\u865a\u62df\u73af\u5883&#xff0c;\u907f\u5f00\u8fc1\u79fb\u540e\u5e38\u89c1\u7684 ba<\/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":[13178,88,81,44],"topic":[],"class_list":["post-119505","post","type-post","status-publish","format-standard","hentry","category-server","tag-1024---","tag-conda","tag-python","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4ece Anaconda \u8fc1\u79fb\u81f3 Miniforge \u6781\u7b80\u5b9e\u6218\u6307\u5357 - \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\/119505.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4ece Anaconda \u8fc1\u79fb\u81f3 Miniforge \u6781\u7b80\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"&#x1f4dd; \u5408\u89c4\u907f\u9669&#xff1a;\u4ece Anaconda \u8fc1\u79fb\u81f3 Miniforge \u6781\u7b80\u5b9e\u6218\u6307\u5357 \u6458\u8981 \u968f\u7740\u5f00\u6e90\u8bb8\u53ef\u5408\u89c4\u6027\u5ba1\u8ba1\u6536\u7d27&#xff0c;\u4f17\u591a\u5927\u578b\u4f01\u4e1a&#xff08;\u8d85200\u4eba&#xff09;\u7eb7\u7eb7\u52a0\u901f\u63a8\u8fdb\u4ece Anaconda \u5411 100% \u514d\u8d39\u5f00\u6e90\u3001\u57fa\u4e8e conda-forge \u793e\u533a\u6258\u7ba1\u7684 Miniforge \u7684\u73af\u5883\u8fc1\u79fb\u3002\u672c\u6587\u5c06\u7b80\u8ff0\u8fd9\u4e00\u6ce2\u8fc1\u79fb\u7684\u6df1\u5c42\u80cc\u666f&#xff0c;\u5e76\u5206\u4eab\u5728\u8fc1\u79fb\u8fc7\u7a0b\u4e2d\u5982\u4f55\u65e0\u7f1d\u4fdd\u7559\u548c\u8fc1\u79fb\u672c\u5730\u539f\u6709\u7684\u865a\u62df\u73af\u5883&#xff0c;\u907f\u5f00\u8fc1\u79fb\u540e\u5e38\u89c1\u7684 ba\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/119505.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-29T13:01:18+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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/119505.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/119505.html\",\"name\":\"\u4ece Anaconda \u8fc1\u79fb\u81f3 Miniforge \u6781\u7b80\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-29T13:01:18+00:00\",\"dateModified\":\"2026-10-29T13:01:18+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/119505.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/119505.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/119505.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4ece Anaconda \u8fc1\u79fb\u81f3 Miniforge \u6781\u7b80\u5b9e\u6218\u6307\u5357\"}]},{\"@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":"\u4ece Anaconda \u8fc1\u79fb\u81f3 Miniforge \u6781\u7b80\u5b9e\u6218\u6307\u5357 - \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\/119505.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4ece Anaconda \u8fc1\u79fb\u81f3 Miniforge \u6781\u7b80\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"&#x1f4dd; \u5408\u89c4\u907f\u9669&#xff1a;\u4ece Anaconda \u8fc1\u79fb\u81f3 Miniforge \u6781\u7b80\u5b9e\u6218\u6307\u5357 \u6458\u8981 \u968f\u7740\u5f00\u6e90\u8bb8\u53ef\u5408\u89c4\u6027\u5ba1\u8ba1\u6536\u7d27&#xff0c;\u4f17\u591a\u5927\u578b\u4f01\u4e1a&#xff08;\u8d85200\u4eba&#xff09;\u7eb7\u7eb7\u52a0\u901f\u63a8\u8fdb\u4ece Anaconda \u5411 100% \u514d\u8d39\u5f00\u6e90\u3001\u57fa\u4e8e conda-forge \u793e\u533a\u6258\u7ba1\u7684 Miniforge \u7684\u73af\u5883\u8fc1\u79fb\u3002\u672c\u6587\u5c06\u7b80\u8ff0\u8fd9\u4e00\u6ce2\u8fc1\u79fb\u7684\u6df1\u5c42\u80cc\u666f&#xff0c;\u5e76\u5206\u4eab\u5728\u8fc1\u79fb\u8fc7\u7a0b\u4e2d\u5982\u4f55\u65e0\u7f1d\u4fdd\u7559\u548c\u8fc1\u79fb\u672c\u5730\u539f\u6709\u7684\u865a\u62df\u73af\u5883&#xff0c;\u907f\u5f00\u8fc1\u79fb\u540e\u5e38\u89c1\u7684 ba","og_url":"https:\/\/www.wsisp.com\/helps\/119505.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-29T13:01:18+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/119505.html","url":"https:\/\/www.wsisp.com\/helps\/119505.html","name":"\u4ece Anaconda \u8fc1\u79fb\u81f3 Miniforge \u6781\u7b80\u5b9e\u6218\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-29T13:01:18+00:00","dateModified":"2026-10-29T13:01:18+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/119505.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/119505.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/119505.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4ece Anaconda \u8fc1\u79fb\u81f3 Miniforge \u6781\u7b80\u5b9e\u6218\u6307\u5357"}]},{"@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\/119505","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=119505"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/119505\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=119505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=119505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=119505"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=119505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}