{"id":73356,"date":"2026-11-21T09:00:00","date_gmt":"2026-11-21T01:00:00","guid":{"rendered":"https:\/\/www.biocloudservice.com\/wordpress\/?p=73356"},"modified":"2026-11-16T21:14:56","modified_gmt":"2026-11-16T13:14:56","slug":"conda-practical-series-05","status":"publish","type":"post","link":"https:\/\/www.biocloudservice.com\/wordpress\/conda-practical-series-05\/","title":{"rendered":"Conda \u4f7f\u7528\u6280\u5de7\uff08\u4e94\uff09\uff1a\u7ec8\u7aef\u80fd\u8dd1\uff0c\u811a\u672c\u4e5f\u8981\u80fd\u8dd1\u2014\u2014\u73af\u5883\u3001\u65e5\u5fd7\u4e0e\u65e5\u5e38\u7ef4\u62a4"},"content":{"rendered":"<div class=\"ysx-conda-series\" style=\"max-width:880px;margin:auto;font-size:17px;line-height:1.9;overflow-wrap:anywhere\">\n<p>\u524d\u56db\u7bc7\u5df2\u7ecf\u5b8c\u6210\u72ec\u7acb\u73af\u5883\u3001\u4f9d\u8d56\u5b89\u88c5\u3001\u9519\u8bef\u5b9a\u4f4d\u548c\u73af\u5883\u91cd\u5efa\u3002\u73b0\u5728\u53ea\u5dee\u6700\u540e\u4e00\u6b65\uff1a\u628a\u201c\u6211\u5750\u5728\u7535\u8111\u524d\u624b\u52a8\u64cd\u4f5c\u80fd\u6210\u529f\u201d\uff0c\u53d8\u6210\u201c\u6362\u4e00\u4e2a\u7ec8\u7aef\u4e5f\u80fd\u6309\u8bf4\u660e\u91cd\u590d\u6267\u884c\u201d\u3002\u5f88\u591a\u81ea\u52a8\u4efb\u52a1\u5931\u8d25\uff0c\u4e0d\u662f\u5206\u6790\u7b97\u6cd5\u51fa\u4e86\u95ee\u9898\uff0c\u800c\u662f\u5b83\u6ca1\u6709\u7ee7\u627f\u4f60\u4e4b\u524d\u6fc0\u6d3b\u8fc7\u7684\u73af\u5883\uff0c\u4e5f\u4e0d\u77e5\u9053\u9879\u76ee\u6587\u4ef6\u653e\u5728\u54ea\u91cc\u3002<\/p>\n<p>\u672c\u7bc7\u4ecd\u8fd0\u884c\u540c\u4e00\u4e2a FASTA \u7edf\u8ba1\u811a\u672c\uff0c\u91cd\u70b9\u653e\u5728\u542f\u52a8\u65b9\u5f0f\u3001\u7ed3\u679c\u68c0\u67e5\u548c\u65e5\u5e38\u7ef4\u62a4\u3002\u4e3b\u4f53\u7684 Python \u542f\u52a8\u5668\u4ee5 Linux\u3001macOS \u7684 Conda \u53ef\u6267\u884c\u6587\u4ef6\u4e3a\u4f8b\uff1bWindows \u8bfb\u8005\u53ef\u4ee5\u6cbf\u7528 Miniforge Prompt \u4e2d\u7684\u624b\u5de5\u547d\u4ee4\uff0c\u81ea\u52a8\u4efb\u52a1\u5219\u8981\u6839\u636e\u5b9e\u9645\u53ef\u6267\u884c\u5165\u53e3\u914d\u7f6e\u3002\u6587\u7ae0\u6700\u540e\u7684 Bash \u5199\u6cd5\u53ea\u9002\u7528\u4e8e Bash\uff0c\u4e0d\u80fd\u76f4\u63a5\u7c98\u8d34\u8fdb PowerShell\u3002<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" style=\"display:block;width:100%;height:auto;margin:24px 0\" alt=\"\u7b2c\u4e94\u7bc7\u793a\u610f\uff1a\u542f\u52a8\u4efb\u52a1\u65f6\u660e\u786e\u7ba1\u7406\u5668\u3001\u73af\u5883\u3001\u76ee\u5f55\u4e0e\u65e5\u5fd7\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2026\/11\/conda-series-20261116-figure-09.png?ssl=1\" \/><\/p>\n<h2 style=\"font-size:25px;line-height:1.5;margin-top:38px;color:#13565c\">\u4e00\u3001\u4e0d\u8981\u4f9d\u8d56\u6628\u5929\u90a3\u4e2a\u5df2\u7ecf\u6fc0\u6d3b\u7684\u7a97\u53e3<\/h2>\n<p>\u4ea4\u4e92\u5f0f\u7ec8\u7aef\u91cc\u8f93\u5165 <code>conda activate conda-lab<\/code> \u540e\uff0c\u540e\u7eed\u547d\u4ee4\u4f1a\u53d7\u5f53\u524d shell \u72b6\u6001\u5f71\u54cd\u3002\u4f46\u53e6\u4e00\u4e2a\u7ec8\u7aef\u3001\u7f16\u8f91\u5668\u3001\u7cfb\u7edf\u4efb\u52a1\u6216\u670d\u52a1\u5668\u8c03\u5ea6\u5668\uff0c\u4e0d\u4e00\u5b9a\u62e5\u6709\u76f8\u540c\u72b6\u6001\u3002\u4f60\u624b\u5de5\u8fd0\u884c\u6210\u529f\uff0c\u53ea\u8bf4\u660e\u5f53\u524d\u5165\u53e3\u6210\u7acb\uff1b\u8981\u4ea4\u7ed9\u81ea\u52a8\u4efb\u52a1\uff0c\u5c31\u8981\u628a\u5173\u952e\u6761\u4ef6\u5199\u8fdb\u542f\u52a8\u547d\u4ee4\u6216\u914d\u7f6e\u3002<\/p>\n<p>\u5148\u8bd5\u6700\u7b80\u5355\u7684\u663e\u5f0f\u8fd0\u884c\u65b9\u5f0f\u3002\u5728\u4fdd\u5b58\u4e86 <code>demo.fa<\/code> \u548c <code>summarize_fasta.py<\/code> \u7684\u9879\u76ee\u76ee\u5f55\u4e2d\u6267\u884c\uff1a<\/p>\n<pre style=\"max-width:100%;overflow-x:auto;padding:18px;background:#edf4f5;border-radius:10px;font-size:14px;line-height:1.65\"><code class=\"language-bash\">conda run -n conda-lab python summarize_fasta.py demo.fa\r\n<\/code><\/pre>\n<p>\u8fd9\u6761\u547d\u4ee4\u628a\u73af\u5883\u540d\u5199\u4e86\u51fa\u6765\uff0c\u7701\u6389\u5bf9\u624b\u5de5\u6fc0\u6d3b\u7684\u4f9d\u8d56\uff0c\u5374\u4ecd\u4f9d\u8d56\u7cfb\u7edf\u80fd\u591f\u627e\u5230 <code>conda<\/code>\uff0c\u4e5f\u4f9d\u8d56\u5f53\u524d\u76ee\u5f55\u6b63\u786e\u3002\u56e0\u6b64\u5b83\u662f\u6539\u8fdb\u7684\u7b2c\u4e00\u6b65\uff0c\u4e0d\u662f\u81ea\u52a8\u5316\u914d\u7f6e\u7684\u7ec8\u70b9\u3002<code>conda run<\/code> \u7684\u5de5\u4f5c\u76ee\u5f55\u4e0e\u8f93\u51fa\u9009\u9879\u53ef\u89c1 <a href=\"https:\/\/docs.conda.io\/projects\/conda\/en\/stable\/commands\/run.html\">\u5b98\u65b9\u547d\u4ee4\u6587\u6863<\/a>\u3002<\/p>\n<p>\u5728 Linux \u6216 macOS \u4e0a\uff0c\u53ef\u4ee5\u5148\u67e5\u770b Conda \u7684\u5b89\u88c5\u6839\u76ee\u5f55\uff0c\u518d\u786e\u8ba4\u5176\u53ef\u6267\u884c\u6587\u4ef6\u4f4d\u7f6e\u3002\u591a\u6570\u6b64\u7c7b\u5b89\u88c5\u5728\u6839\u76ee\u5f55\u4e0b\u6709 <code>bin\/conda<\/code>\uff0c\u4f46\u5e94\u6309\u5b9e\u9645\u7ed3\u679c\u6838\u5b9e\u3002\u628a\u771f\u5b9e\u8def\u5f84\u4fdd\u5b58\u4e0b\u6765\uff0c\u6bd4\u5728\u4efb\u52a1\u91cc\u5047\u8bbe\u6bcf\u4e2a\u4eba\u90fd\u88c5\u5230\u4e86\u76f8\u540c\u4f4d\u7f6e\u66f4\u53ef\u9760\u3002<\/p>\n<pre style=\"max-width:100%;overflow-x:auto;padding:18px;background:#edf4f5;border-radius:10px;font-size:14px;line-height:1.65\"><code class=\"language-bash\">conda info --base\r\nconda run -n conda-lab python -c &quot;import sys; print(sys.executable)&quot;\r\n<\/code><\/pre>\n<p>\u5982\u679c\u540c\u4e00\u53f0\u673a\u5668\u6709\u591a\u4e2a Conda \u5b89\u88c5\uff0c\u73af\u5883\u540d\u8fd8\u53ef\u80fd\u91cd\u540d\u3002\u81ea\u52a8\u4efb\u52a1\u5fc5\u987b\u540c\u65f6\u660e\u786e\u4f7f\u7528\u54ea\u4e2a\u7ba1\u7406\u5668\u548c\u54ea\u4e2a\u73af\u5883\u3002\u9700\u8981\u6d88\u9664\u540d\u79f0\u6b67\u4e49\u65f6\uff0c\u53ef\u4f7f\u7528 <code>conda run -p<\/code> \u6307\u5411\u73af\u5883\u7684\u7edd\u5bf9\u8def\u5f84\uff1b\u6b64\u65f6\u4e0d\u8981\u518d\u540c\u65f6\u4f7f\u7528 <code>-n<\/code>\u3002\u66f4\u6362\u673a\u5668\u540e\u8def\u5f84\u4f1a\u6539\u53d8\uff0c\u5e94\u628a\u5b83\u4f5c\u4e3a\u90e8\u7f72\u914d\u7f6e\u6765\u66f4\u65b0\u3002<\/p>\n<h2 style=\"font-size:25px;line-height:1.5;margin-top:38px;color:#13565c\">\u4e8c\u3001\u8ba9\u5de5\u4f5c\u76ee\u5f55\u7531\u811a\u672c\u81ea\u8eab\u51b3\u5b9a<\/h2>\n<p>\u4e0b\u9762\u521b\u5efa <code>run_demo.py<\/code>\uff0c\u653e\u5728\u4e0e\u5206\u6790\u811a\u672c\u3001\u8f93\u5165\u6587\u4ef6\u76f8\u540c\u7684\u9879\u76ee\u76ee\u5f55\u3002\u5b83\u4ece\u81ea\u5df1\u7684\u4f4d\u7f6e\u786e\u5b9a\u5de5\u4f5c\u76ee\u5f55\uff0c\u4ece\u547d\u4ee4\u884c\u63a5\u6536 Conda \u53ef\u6267\u884c\u6587\u4ef6\u8def\u5f84\u3002\u8fd9\u6837\u65e0\u8bba\u4f60\u4ece\u54ea\u4e2a\u76ee\u5f55\u542f\u52a8\uff0c\u90fd\u4e0d\u4f1a\u8bef\u8bfb\u53e6\u4e00\u4efd\u540c\u540d <code>demo.fa<\/code>\u3002<\/p>\n<pre style=\"max-width:100%;overflow-x:auto;padding:18px;background:#edf4f5;border-radius:10px;font-size:14px;line-height:1.65\"><code class=\"language-python\">import json\r\nimport os\r\nimport subprocess\r\nimport sys\r\nfrom datetime import datetime, timezone\r\nfrom pathlib import Path\r\n\r\nroot = Path(__file__).resolve().parent\r\nif len(sys.argv) != 2:\r\n    raise SystemExit(&quot;Usage: python run_demo.py \/absolute\/path\/to\/bin\/conda&quot;)\r\nconda = Path(sys.argv[1]).resolve()\r\nif not conda.is_file():\r\n    raise SystemExit(f&quot;Conda executable not found: {conda}&quot;)\r\n\r\nstamp = datetime.now(timezone.utc).strftime(&quot;%Y%m%dT%H%M%S.%fZ&quot;)\r\nrun_dir = root \/ &quot;runs&quot; \/ f&quot;{stamp}-{os.getpid()}&quot;\r\nrun_dir.mkdir(parents=True, exist_ok=False)\r\ncommand = [str(conda), &quot;run&quot;, &quot;-n&quot;, &quot;conda-lab&quot;, &quot;python&quot;,\r\n           str(root \/ &quot;summarize_fasta.py&quot;), str(root \/ &quot;demo.fa&quot;)]\r\nresult = subprocess.run(command, cwd=root, capture_output=True,\r\n                        text=True, encoding=&quot;utf-8&quot;)\r\n(run_dir \/ &quot;stdout.txt&quot;).write_text(result.stdout, encoding=&quot;utf-8&quot;)\r\n(run_dir \/ &quot;stderr.txt&quot;).write_text(result.stderr, encoding=&quot;utf-8&quot;)\r\nmetadata = {&quot;command&quot;: command, &quot;cwd&quot;: str(root),\r\n            &quot;started_utc&quot;: stamp, &quot;returncode&quot;: result.returncode}\r\n(run_dir \/ &quot;run.json&quot;).write_text(json.dumps(metadata, indent=2), encoding=&quot;utf-8&quot;)\r\nif result.returncode != 0:\r\n    raise SystemExit(f&quot;Task failed; see {run_dir}&quot;)\r\n\r\nexpected = &quot;id\\tlength\\tgc_percent\\nseq_A\\t8\\t50.00\\nseq_B\\t6\\t66.67\\n&quot;\r\nactual = result.stdout.strip().replace(&quot;\\r\\n&quot;, &quot;\\n&quot;) + &quot;\\n&quot;\r\nif actual != expected:\r\n    raise SystemExit(f&quot;Unexpected result; see {run_dir}&quot;)\r\n(run_dir \/ &quot;summary.tsv&quot;).write_text(actual, encoding=&quot;utf-8&quot;)\r\n(run_dir \/ &quot;SUCCESS&quot;).write_text(&quot;Validated\\n&quot;, encoding=&quot;utf-8&quot;)\r\nprint(f&quot;PASS: {run_dir}&quot;)\r\n<\/code><\/pre>\n<p>\u542f\u52a8\u65f6\uff0c\u628a\u4e0b\u9762\u793a\u4f8b\u8def\u5f84\u6362\u6210\u81ea\u5df1\u786e\u8ba4\u8fc7\u7684\u771f\u5b9e\u8def\u5f84\u3002\u8def\u5f84\u5e26\u7a7a\u683c\u65f6\u4fdd\u7559\u5f15\u53f7\u3002\u8fd9\u91cc\u9009\u62e9\u76ee\u6807\u73af\u5883\u91cc\u7684 Python \u6267\u884c\u542f\u52a8\u5668\uff0c\u518d\u7531\u542f\u52a8\u5668\u663e\u5f0f\u8c03\u7528 Conda\uff1b\u751f\u4ea7\u4efb\u52a1\u4e5f\u53ef\u4ee5\u7528\u53e6\u5916\u4e00\u4e2a\u53d7\u63a7 Python \u6765\u8fd0\u884c\u542f\u52a8\u5668\uff0c\u56e0\u4e3a\u5b83\u53ea\u4f7f\u7528\u6807\u51c6\u5e93\u3002<\/p>\n<pre style=\"max-width:100%;overflow-x:auto;padding:18px;background:#edf4f5;border-radius:10px;font-size:14px;line-height:1.65\"><code class=\"language-bash\"># Linux \/ macOS \u793a\u4f8b\uff1a\u66ff\u6362\u5b9e\u9645 Conda \u8def\u5f84\r\nconda run -n conda-lab python run_demo.py &quot;\/absolute\/path\/to\/bin\/conda&quot;\r\n<\/code><\/pre>\n<p>\u4ee3\u7801\u7a0d\u957f\uff0c\u662f\u56e0\u4e3a\u6211\u4eec\u628a\u539f\u6765\u9760\u4eba\u8bb0\u5fc6\u7684\u6761\u4ef6\u90fd\u5199\u51fa\u6765\u4e86\u3002\u6bcf\u6b21\u8fd0\u884c\u4f1a\u5efa\u7acb\u72ec\u7acb\u76ee\u5f55\uff0c\u4fdd\u5b58\u6807\u51c6\u8f93\u51fa\u3001\u9519\u8bef\u8f93\u51fa\u548c\u542f\u52a8\u53c2\u6570\uff1b\u53ea\u6709\u7a0b\u5e8f\u6210\u529f\u4e14\u7ed3\u679c\u5339\u914d\uff0c\u624d\u751f\u6210 <code>summary.tsv<\/code> \u548c <code>SUCCESS<\/code>\u3002\u8fd9\u6837\u65e7\u7ed3\u679c\u4e0d\u4f1a\u88ab\u65b0\u5931\u8d25\u4efb\u52a1\u4f2a\u88c5\u6210\u521a\u521a\u5b8c\u6210\u7684\u6210\u679c\u3002<\/p>\n<h2 style=\"font-size:25px;line-height:1.5;margin-top:38px;color:#13565c\">\u4e09\u3001\u9000\u51fa\u7801\u3001\u65e5\u5fd7\u548c\u7ed3\u679c\u5206\u522b\u56de\u7b54\u4e0d\u540c\u95ee\u9898<\/h2>\n<p>\u9000\u51fa\u7801\u4e3a\u96f6\uff0c\u8868\u793a\u88ab\u8c03\u7528\u7a0b\u5e8f\u6309\u81ea\u8eab\u89c4\u5219\u6b63\u5e38\u7ed3\u675f\uff1b\u5b83\u4e0d\u80fd\u5355\u72ec\u8bc1\u660e\u79d1\u5b66\u7ed3\u679c\u6b63\u786e\u3002\u65e5\u5fd7\u8bb0\u5f55\u7a0b\u5e8f\u8bf4\u4e86\u4ec0\u4e48\uff1b\u5b83\u4e5f\u4e0d\u80fd\u4fdd\u8bc1\u6bcf\u4e2a\u8f93\u51fa\u6587\u4ef6\u90fd\u5b8c\u6574\u3002\u672c\u4f8b\u56e0\u6b64\u53c8\u68c0\u67e5\u56fa\u5b9a\u8868\u5934\u3001\u4e24\u6761\u8bb0\u5f55\u548c\u6570\u503c\uff0c\u8ba9\u201c\u8fd0\u884c\u6210\u529f\u201d\u548c\u201c\u7ed3\u679c\u7b26\u5408\u9884\u671f\u201d\u540c\u65f6\u6210\u7acb\u3002<\/p>\n<p>\u771f\u5b9e\u5206\u6790\u9700\u8981\u628a\u8fd9\u4e2a\u68c0\u67e5\u66ff\u6362\u6210\u5408\u9002\u7684\u6807\u51c6\uff0c\u4f8b\u5982\u6837\u672c\u6570\u91cf\u662f\u5426\u9f50\u5168\u3001\u8f93\u51fa\u77e9\u9635\u7ef4\u5ea6\u662f\u5426\u5408\u7406\u3001\u6587\u4ef6\u662f\u5426\u80fd\u88ab\u4e0b\u6e38\u5de5\u5177\u8bfb\u53d6\u3002\u4e0d\u8981\u628a\u672c\u4f8b\u7684\u4e24\u6761\u56fa\u5b9a\u5e8f\u5217\u9a8c\u6536\u76f4\u63a5\u7528\u4e8e\u771f\u5b9e\u6837\u672c\uff1b\u6bcf\u4e2a\u9879\u76ee\u90fd\u9700\u8981\u81ea\u5df1\u7684\u8f93\u5165\u8bf4\u660e\u4e0e\u9a8c\u6536\u89c4\u5219\u3002<\/p>\n<div style=\"overflow-x:auto\">\n<table style=\"min-width:560px;width:100%;border-collapse:collapse\">\n<thead>\n<tr>\n<th style=\"padding:12px;background:#e8f5f1;border:1px solid #c9ded7;text-align:left\">\u6587\u4ef6\u6216\u4fe1\u53f7<\/th>\n<th style=\"padding:12px;background:#e8f5f1;border:1px solid #c9ded7;text-align:left\">\u56de\u7b54\u7684\u95ee\u9898<\/th>\n<th style=\"padding:12px;background:#e8f5f1;border:1px solid #c9ded7;text-align:left\">\u4f7f\u7528\u65b9\u5f0f<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"padding:12px;border:1px solid #c9ded7\">run.json<\/td>\n<td style=\"padding:12px;border:1px solid #c9ded7\">\u7528\u4ec0\u4e48\u547d\u4ee4\u3001\u5728\u54ea\u8fd0\u884c<\/td>\n<td style=\"padding:12px;border:1px solid #c9ded7\">\u6392\u67e5\u73af\u5883\u4e0e\u8def\u5f84\u5dee\u5f02<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px;border:1px solid #c9ded7\">stdout.txt<\/td>\n<td style=\"padding:12px;border:1px solid #c9ded7\">\u7a0b\u5e8f\u6b63\u5e38\u8f93\u51fa\u4e86\u4ec0\u4e48<\/td>\n<td style=\"padding:12px;border:1px solid #c9ded7\">\u6838\u5bf9\u7ed3\u679c\u53ca\u63d0\u793a<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px;border:1px solid #c9ded7\">stderr.txt<\/td>\n<td style=\"padding:12px;border:1px solid #c9ded7\">\u662f\u5426\u6709\u9519\u8bef\u6216\u8bca\u65ad\u4fe1\u606f<\/td>\n<td style=\"padding:12px;border:1px solid #c9ded7\">\u4fdd\u7559\u5b8c\u6574\u4e0a\u4e0b\u6587<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px;border:1px solid #c9ded7\">returncode<\/td>\n<td style=\"padding:12px;border:1px solid #c9ded7\">\u7a0b\u5e8f\u662f\u5426\u62a5\u544a\u5931\u8d25<\/td>\n<td style=\"padding:12px;border:1px solid #c9ded7\">\u963b\u6b62\u5931\u8d25\u7ed3\u679c\u8fdb\u5165\u4e0b\u4e00\u6b65<\/td>\n<\/tr>\n<tr>\n<td style=\"padding:12px;border:1px solid #c9ded7\">SUCCESS<\/td>\n<td style=\"padding:12px;border:1px solid #c9ded7\">\u672c\u4f8b\u9a8c\u6536\u662f\u5426\u901a\u8fc7<\/td>\n<td style=\"padding:12px;border:1px solid #c9ded7\">\u53ea\u6709\u68c0\u67e5\u901a\u8fc7\u624d\u751f\u6210<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>\u5982\u679c\u8981\u89c2\u5bdf\u8fd0\u884c\u4e2d\u7684\u8f93\u51fa\uff0c<code>conda run --no-capture-output<\/code> \u53ef\u4ee5\u628a\u7a0b\u5e8f\u8f93\u51fa\u76f4\u63a5\u4f20\u9012\u5230\u8c03\u7528\u7aef\uff0c\u4f46\u5b83\u4e0e\u4e0a\u9762\u201c\u6536\u96c6\u5b8c\u6574\u8f93\u51fa\u540e\u9a8c\u6536\u201d\u7684\u8bbe\u8ba1\u662f\u4e0d\u540c\u7528\u9014\u3002\u957f\u65f6\u95f4\u8fd0\u884c\u7684\u5206\u6790\u8fd8\u53ef\u80fd\u9700\u8981\u6d41\u5f0f\u65e5\u5fd7\uff0c\u907f\u514d\u5728\u5185\u5b58\u91cc\u79ef\u7d2f\u5927\u91cf\u6587\u672c\u3002\u672c\u4f8b\u8f93\u51fa\u5f88\u77ed\uff0c\u56e0\u6b64\u91c7\u7528\u5bb9\u6613\u7406\u89e3\u7684\u6536\u96c6\u65b9\u5f0f\u3002<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" style=\"display:block;width:100%;height:auto;margin:24px 0\" alt=\"\u7b2c\u4e94\u7bc7\u9a8c\u6536\u793a\u610f\uff1a\u72ec\u7acb\u8fd0\u884c\u76ee\u5f55\u4e2d\u4fdd\u5b58\u53c2\u6570\u3001\u65e5\u5fd7\u3001\u7ed3\u679c\u4e0e\u6210\u529f\u6807\u8bb0\" src=\"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2026\/11\/conda-series-20261116-figure-10.png?ssl=1\" \/><\/p>\n<h2 style=\"font-size:25px;line-height:1.5;margin-top:38px;color:#13565c\">\u56db\u3001\u6545\u610f\u5236\u9020\u4e00\u6b21\u5c0f\u9519\u8bef\uff0c\u770b\u770b\u5931\u8d25\u4f1a\u4e0d\u4f1a\u88ab\u53d1\u73b0<\/h2>\n<p>\u65b0\u624b\u7ecf\u5e38\u53ea\u6d4b\u8bd5\u6210\u529f\u8def\u5f84\uff0c\u5374\u6ca1\u6709\u9a8c\u8bc1\u51fa\u9519\u65f6\u7cfb\u7edf\u4f1a\u5982\u4f55\u53cd\u5e94\u3002\u53ef\u4ee5\u590d\u5236\u4e00\u4e2a\u7ec3\u4e60\u76ee\u5f55\uff0c\u5728\u526f\u672c\u4e2d\u628a\u8f93\u5165\u6587\u4ef6\u6539\u540d\uff0c\u518d\u542f\u52a8\u4efb\u52a1\u3002\u56e0\u4e3a\u5206\u6790\u811a\u672c\u627e\u4e0d\u5230\u9884\u671f\u8f93\u5165\uff0c\u4efb\u52a1\u5e94\u62a5\u544a\u5931\u8d25\uff0c\u65e5\u5fd7\u76ee\u5f55\u5e94\u4fdd\u7559\u4e0b\u6765\uff0c\u800c\u4e14\u4e0d\u80fd\u751f\u6210\u6210\u529f\u6807\u8bb0\u3002\u5b8c\u6210\u540e\u6062\u590d\u6587\u4ef6\u540d\uff0c\u518d\u8fd0\u884c\u4e00\u6b21\u786e\u8ba4\u6062\u590d\u6b63\u5e38\u3002<\/p>\n<p>\u53e6\u4e00\u79cd\u7ec3\u4e60\u662f\u628a\u4e00\u6761\u5e8f\u5217\u6539\u6210\u542b\u6709 <code>N<\/code> \u7684\u5b57\u7b26\u4e32\u3002\u7b2c\u4e8c\u7bc7\u7684\u6559\u5b66\u811a\u672c\u660e\u786e\u53ea\u63a5\u53d7 ACGT\uff0c\u56e0\u6b64\u5e94\u62d2\u7edd\u8be5\u8f93\u5165\u3002\u6b64\u65f6\u8981\u533a\u5206\u4e24\u7c7b\u6545\u969c\uff1a\u89e3\u91ca\u5668\u548c\u4f9d\u8d56\u6ca1\u6709\u95ee\u9898\uff0c\u662f\u8f93\u5165\u4e0d\u7b26\u5408\u5f53\u524d\u811a\u672c\u5b9a\u4e49\u3002\u4e0d\u8981\u56e0\u4e3a\u770b\u5230\u9519\u8bef\u5c31\u56de\u5230 Conda \u91cc\u91cd\u88c5\u5305\u3002<\/p>\n<p>\u518d\u505a\u4e00\u6b21\u201c\u7ed3\u679c\u53d8\u5316\u201d\u7684\u7ec3\u4e60\uff1a\u628a\u7b2c\u4e00\u6761\u5e8f\u5217\u6362\u6210\u5176\u4ed6\u5408\u6cd5\u5e8f\u5217\u3002\u7a0b\u5e8f\u53ef\u80fd\u6b63\u5e38\u7ed3\u675f\uff0c\u4f46\u672c\u7bc7\u542f\u52a8\u5668\u4ecd\u5e94\u5224\u5b9a\u4e0e\u56fa\u5b9a\u671f\u671b\u4e0d\u4e00\u81f4\u3002\u8fd9\u4e2a\u5931\u8d25\u662f\u5408\u7406\u7684\uff0c\u56e0\u4e3a\u6211\u4eec\u9a8c\u8bc1\u7684\u662f\u4e00\u4e2a\u56fa\u5b9a\u6837\u4f8b\u3002\u6539\u6210\u771f\u5b9e\u751f\u4ea7\u6d41\u7a0b\u65f6\uff0c\u5e94\u540c\u65f6\u66f4\u6362\u8f93\u5165\u548c\u9a8c\u6536\u89c4\u5219\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u5220\u9664\u6240\u6709\u68c0\u67e5\u3002<\/p>\n<h2 style=\"font-size:25px;line-height:1.5;margin-top:38px;color:#13565c\">\u4e94\u3001\u65e5\u5e38\u7ef4\u62a4\u8981\u56f4\u7ed5\u4e00\u4e2a\u53ef\u9a8c\u6536\u7684\u53d8\u66f4<\/h2>\n<p>\u9879\u76ee\u7a33\u5b9a\u4ee5\u540e\uff0c\u8f6f\u4ef6\u5347\u7ea7\u4e5f\u5e94\u6709\u660e\u786e\u76ee\u7684\uff0c\u4f8b\u5982\u4fee\u590d\u67d0\u4e2a\u5df2\u786e\u8ba4\u95ee\u9898\u6216\u6ee1\u8db3\u65b0\u5de5\u5177\u8981\u6c42\u3002\u5148\u5bfc\u51fa\u6e05\u5355\uff0c\u5728\u72ec\u7acb\u73af\u5883\u6d4b\u8bd5\uff0c\u518d\u8dd1\u539f\u6765\u7684\u5c0f\u6837\u4f8b\u4e0e\u5fc5\u8981\u7684\u771f\u5b9e\u6570\u636e\u68c0\u67e5\u3002\u4e0d\u8981\u628a\u201c\u5168\u90e8\u66f4\u65b0\u5230\u6700\u65b0\u201d\u5f53\u4f5c\u65e5\u5e38\u6e05\u6d01\u52a8\u4f5c\uff0c\u56e0\u4e3a\u5b83\u53ef\u80fd\u540c\u65f6\u6539\u53d8\u591a\u4e2a\u76f8\u4e92\u4f9d\u8d56\u7684\u7ec4\u4ef6\u3002<\/p>\n<p>\u7a7a\u95f4\u4e0d\u8db3\u65f6\uff0c\u5148\u5206\u6e05\u9879\u76ee\u6570\u636e\u3001\u73af\u5883\u6587\u4ef6\u4e0e\u4e0b\u8f7d\u7f13\u5b58\u3002\u7f13\u5b58\u6e05\u7406\u548c\u5220\u9664\u9879\u76ee\u4e0d\u662f\u540c\u4e00\u4ef6\u4e8b\uff0c\u4e5f\u4e0d\u5e94\u8be5\u7528\u4e00\u4e2a\u7b3c\u7edf\u7684\u9012\u5f52\u5220\u9664\u547d\u4ee4\u5904\u7406\u3002\u53ef\u4ee5\u5148\u9884\u6f14\u6e05\u7406\u5df2\u4e0b\u8f7d\u7684\u5305\u5f52\u6863\uff0c\u6838\u5bf9\u8303\u56f4\u540e\u518d\u51b3\u5b9a\u662f\u5426\u6267\u884c\u3002\u4e0b\u9762\u53ea\u9884\u6f14\uff0c\u4e0d\u4f1a\u76f4\u63a5\u5220\u9664\u3002<\/p>\n<pre style=\"max-width:100%;overflow-x:auto;padding:18px;background:#edf4f5;border-radius:10px;font-size:14px;line-height:1.65\"><code class=\"language-bash\">conda clean --tarballs --dry-run\r\nconda info --envs\r\n<\/code><\/pre>\n<p>\u66f4\u6fc0\u8fdb\u7684\u7f13\u5b58\u9009\u9879\u53ef\u80fd\u5f71\u54cd\u4f9d\u8d56\u7f13\u5b58\u8def\u5f84\u7684\u73af\u5883\uff0c\u5c24\u5176\u662f\u6d89\u53ca\u94fe\u63a5\u65f6\uff0c\u4e0d\u80fd\u4e00\u6982\u8ba4\u4e3a\u6240\u6709\u7f13\u5b58\u90fd\u53ef\u968f\u4fbf\u5220\u9664\u3002\u5177\u4f53\u8303\u56f4\u89c1 <a href=\"https:\/\/docs.conda.io\/projects\/conda\/en\/stable\/commands\/clean.html\">conda clean \u6587\u6863<\/a>\u3002\u4e34\u65f6\u73af\u5883\u4e5f\u8981\u5728\u786e\u8ba4\u4e0d\u518d\u88ab\u4efb\u52a1\u5f15\u7528\u3001\u76f8\u5173\u6e05\u5355\u548c\u7ed3\u679c\u5df2\u7ecf\u4fdd\u5b58\u540e\u624d\u79fb\u9664\uff0c\u4e0d\u8981\u628a\u6b63\u5728\u8fd0\u884c\u7684\u73af\u5883\u4f5c\u4e3a\u91ca\u653e\u7a7a\u95f4\u7684\u9996\u9009\u3002<\/p>\n<p>\u5728 Bash \u811a\u672c\u4e2d\uff0c\u5e38\u89c1\u7684 <code>set -euo pipefail<\/code> \u53ef\u4ee5\u5e2e\u52a9\u66b4\u9732\u90e8\u5206\u5931\u8d25\u548c\u672a\u5b9a\u4e49\u53d8\u91cf\uff0c\u4f46\u5b83\u4e0d\u80fd\u66ff\u4ee3\u9010\u6b65\u7684\u4e1a\u52a1\u68c0\u67e5\u3002\u7528\u7ba1\u9053\u8fde\u63a5\u5206\u6790\u547d\u4ee4\u548c\u65e5\u5fd7\u547d\u4ee4\u65f6\uff0c\u4e5f\u8981\u5173\u6ce8\u771f\u6b63\u5206\u6790\u8fdb\u7a0b\u7684\u9000\u51fa\u72b6\u6001\u3002\u7a0b\u5e8f\u6253\u5370\u4e86\u51e0\u884c\u65e5\u5fd7\uff0c\u4e0d\u7b49\u4e8e\u540e\u53f0\u4efb\u52a1\u4e00\u76f4\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<h2 style=\"font-size:25px;line-height:1.5;margin-top:38px;color:#13565c\">\u516d\u3001\u628a\u4e94\u7bc7\u5185\u5bb9\u6536\u6210\u81ea\u5df1\u7684\u5de5\u4f5c\u4e60\u60ef<\/h2>\n<p>\u6bcf\u4e2a\u65b0\u9879\u76ee\u90fd\u53ef\u4ee5\u4ece\u4e00\u5f20\u5f88\u77ed\u7684\u8bf4\u660e\u5f00\u59cb\uff1a\u73af\u5883\u540d\u79f0\u3001\u76f4\u63a5\u4f9d\u8d56\u3001\u9879\u76ee\u76ee\u5f55\u3001\u793a\u4f8b\u8f93\u5165\u3001\u542f\u52a8\u547d\u4ee4\u4e0e\u9884\u671f\u7ed3\u679c\u3002\u9047\u5230\u95ee\u9898\u5148\u4fdd\u5b58\u8bc1\u636e\u518d\u6539\u914d\u7f6e\uff0c\u589e\u52a0\u4f9d\u8d56\u540e\u66f4\u65b0\u73af\u5883\u6587\u4ef6\uff0c\u51c6\u5907\u4ea4\u63a5\u65f6\u5728\u65b0\u73af\u5883\u91cd\u5efa\u4e00\u6b21\uff0c\u81ea\u52a8\u8fd0\u884c\u65f6\u663e\u5f0f\u6307\u5b9a\u5165\u53e3\u548c\u76ee\u5f55\u3002\u8fd9\u6837\u505a\u4e0d\u9700\u8981\u8bb0\u4f4f\u6240\u6709 Conda \u9009\u9879\uff0c\u5374\u80fd\u8ba9\u95ee\u9898\u66f4\u5bb9\u6613\u5b9a\u4f4d\u3002<\/p>\n<p>\u672c\u7cfb\u5217\u53ea\u5b8c\u6210\u4e00\u4e2a\u6559\u5b66\u7528\u7684\u5e8f\u5217\u7edf\u8ba1\u9879\u76ee\uff0c\u6ca1\u6709\u8986\u76d6\u96c6\u7fa4\u8c03\u5ea6\u3001\u6d77\u91cf\u5e8f\u5217\u6d41\u5f0f\u5904\u7406\u6216\u590d\u6742 GPU \u8f6f\u4ef6\u3002\u9762\u5bf9\u8fd9\u4e9b\u4efb\u52a1\u65f6\uff0c\u5e94\u5728\u76f8\u540c\u601d\u8def\u4e0a\u8865\u5145\u8d44\u6e90\u7533\u8bf7\u3001\u8f93\u5165\u5b8c\u6574\u6027\u548c\u79d1\u5b66\u7ed3\u679c\u9a8c\u6536\u3002\u73af\u5883\u7ba1\u7406\u7684\u4ef7\u503c\uff0c\u662f\u8ba9\u5206\u6790\u8fc7\u7a0b\u7684\u6761\u4ef6\u8bf4\u5f97\u6e05\u3001\u67e5\u5f97\u5230\u3001\u80fd\u91cd\u590d\uff0c\u800c\u4e0d\u662f\u8ba9\u8f6f\u4ef6\u5305\u6570\u91cf\u8d8a\u79ef\u8d8a\u591a\u3002<\/p>\n<p>\u5982\u679c\u4f60\u5df2\u7ecf\u6709\u80fd\u591f\u624b\u5de5\u8fd0\u884c\u7684\u811a\u672c\uff0c\u5e0c\u671b\u8fc1\u5230\u4e91\u751f\u4fe1\u670d\u52a1\u5668\u6301\u7eed\u4f7f\u7528\uff0c\u53ef\u4ee5\u51c6\u5907\u8f6f\u4ef6\u6e05\u5355\u3001\u6570\u636e\u89c4\u6a21\u3001\u542f\u52a8\u65b9\u5f0f\u548c\u4e00\u4e2a\u53ef\u5206\u4eab\u7684\u5c0f\u6837\u4f8b\uff0c\u518d<a href=\"https:\/\/work.weixin.qq.com\/kfid\/kfcb05492f29d4d6064\">\u8054\u7cfb\u4e91\u751f\u4fe1\u54a8\u8be2\u8fd0\u884c\u73af\u5883\u4e0e\u8d44\u6e90\u914d\u7f6e<\/a>\u3002\u5148\u660e\u786e\u54ea\u4e9b\u6b65\u9aa4\u9700\u8981\u81ea\u5df1\u64cd\u4f5c\u3001\u54ea\u4e9b\u9700\u8981\u6280\u672f\u652f\u6301\uff0c\u518d\u8ba8\u8bba\u9002\u5408\u7684\u670d\u52a1\u8303\u56f4\u3002<\/p>\n<nav aria-label=\"Conda\u7cfb\u5217\u5bfc\u822a\" style=\"margin-top:36px;padding:20px;background:#eef8f4;border-radius:12px\">\n<h2>Conda \u4f7f\u7528\u6280\u5de7\u7cfb\u5217\u76ee\u5f55<\/h2>\n<p>\u5168\u7cfb\u5217\u6309\u5317\u4eac\u65f6\u95f4\u6bcf\u5929\u4e0a\u5348 9 \u70b9\u9646\u7eed\u5f00\u653e\u3002\u540e\u7eed\u7bc7\u7ae0\u8bf7\u5728\u6807\u6ce8\u65e5\u671f\u4e0a\u7ebf\u540e\u9605\u8bfb\u3002<\/p>\n<ol>\n<li><a href=\"https:\/\/www.biocloudservice.com\/wordpress\/?p=73352\">Conda \u4f7f\u7528\u6280\u5de7\uff08\u4e00\uff09\uff1a\u4ece\u96f6\u521b\u5efa\u72ec\u7acb\u73af\u5883\uff0c\u8dd1\u901a\u7b2c\u4e00\u4e2a\u5e8f\u5217\u7edf\u8ba1\u811a\u672c<\/a>\uff0811-17 09:00\uff09<\/li>\n<li><a href=\"https:\/\/www.biocloudservice.com\/wordpress\/?p=73353\">Conda \u4f7f\u7528\u6280\u5de7\uff08\u4e8c\uff09\uff1a\u8f6f\u4ef6\u5e94\u8be5\u4ece\u54ea\u91cc\u88c5\uff1f\u5f04\u61c2\u6e20\u9053\u3001\u7248\u672c\u4e0e pip<\/a>\uff0811-18 09:00\uff09<\/li>\n<li><a href=\"https:\/\/www.biocloudservice.com\/wordpress\/?p=73354\">Conda \u4f7f\u7528\u6280\u5de7\uff08\u4e09\uff09\uff1a\u88c5\u597d\u4e86\u8fd8\u662f\u62a5\u9519\uff1f\u6309\u987a\u5e8f\u89e3\u51b3\u73af\u5883\u3001\u4f9d\u8d56\u548c\u7f51\u7edc\u95ee\u9898<\/a>\uff0811-19 09:00\uff09<\/li>\n<li><a href=\"https:\/\/www.biocloudservice.com\/wordpress\/?p=73355\">Conda \u4f7f\u7528\u6280\u5de7\uff08\u56db\uff09\uff1a\u73af\u5883\u914d\u597d\u540e\u600e\u4e48\u4fdd\u5b58\uff1f\u4ece environment.yml \u5230\u590d\u73b0\u9a8c\u6536<\/a>\uff0811-20 09:00\uff09<\/li>\n<li><a href=\"https:\/\/www.biocloudservice.com\/wordpress\/?p=73356\">Conda \u4f7f\u7528\u6280\u5de7\uff08\u4e94\uff09\uff1a\u7ec8\u7aef\u80fd\u8dd1\uff0c\u811a\u672c\u4e5f\u8981\u80fd\u8dd1\u2014\u2014\u73af\u5883\u3001\u65e5\u5fd7\u4e0e\u65e5\u5e38\u7ef4\u62a4<\/a>\uff0811-21 09:00\uff09<\/li>\n<\/ol>\n<\/nav>\n<p><a href=\"https:\/\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2026\/11\/conda-series-20261116-conda-lab-examples.zip\">\u4e0b\u8f7d\u5168\u7cfb\u5217\u7ec3\u4e60\u4ee3\u7801\u3001\u793a\u4f8b\u6570\u636e\u4e0e\u73af\u5883\u6587\u4ef6<\/a>\uff08ZIP\uff1b\u542b\u64cd\u4f5c\u8bf4\u660e\u4e0e\u9884\u671f\u8f93\u51fa\uff09<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56db\u7bc7\u5df2\u7ecf\u5b8c\u6210\u72ec\u7acb\u73af\u5883\u3001\u4f9d\u8d56\u5b89\u88c5\u3001\u9519\u8bef\u5b9a\u4f4d\u548c\u73af\u5883\u91cd\u5efa\u3002\u73b0\u5728\u53ea\u5dee\u6700\u540e\u4e00\u6b65\uff1a\u628a\u201c\u6211\u5750\u5728\u7535\u8111\u524d\u624b\u52a8\u64cd\u4f5c\u80fd\u6210\u529f\u201d\uff0c\u53d8\u6210\u201c\u6362\u4e00\u4e2a\u7ec8\u7aef\u4e5f\u80fd\u6309\u8bf4\u660e\u91cd\u590d\u6267\u884c\u201d\u3002\u5f88\u591a\u81ea\u52a8\u4efb\u52a1\u5931\u8d25\uff0c\u4e0d\u662f\u5206\u6790\u7b97\u6cd5\u51fa\u4e86\u95ee\u9898\uff0c\u800c\u662f\u5b83\u6ca1\u6709\u7ee7\u627f\u4f60\u4e4b\u524d\u6fc0\u6d3b\u8fc7\u7684\u73af\u5883\uff0c\u4e5f\u4e0d\u77e5\u9053\u9879\u76ee\u6587\u4ef6\u653e\u5728\u54ea\u91cc\u3002<\/p>\n","protected":false},"author":1,"featured_media":73370,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[49,75],"tags":[1465,1466,1467,172],"class_list":["post-73356","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","category-compute-environment","tag-conda","tag-1467","tag-172"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.biocloudservice.com\/wordpress\/wp-content\/uploads\/2026\/11\/conda-series-20261116-figure-09.png?fit=1400%2C900&ssl=1","_links":{"self":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/73356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/comments?post=73356"}],"version-history":[{"count":1,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/73356\/revisions"}],"predecessor-version":[{"id":73372,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/posts\/73356\/revisions\/73372"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media\/73370"}],"wp:attachment":[{"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/media?parent=73356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/categories?post=73356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.biocloudservice.com\/wordpress\/wp-json\/wp\/v2\/tags?post=73356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}