{"id":529,"date":"2019-11-13T08:16:53","date_gmt":"2019-11-13T00:16:53","guid":{"rendered":"http:\/\/www.mustenaka.cn\/?p=529"},"modified":"2019-11-20T02:06:59","modified_gmt":"2019-11-19T18:06:59","slug":"condaruninchinesename","status":"publish","type":"post","link":"https:\/\/www.mustenaka.cn\/index.php\/2019\/11\/13\/condaruninchinesename\/","title":{"rendered":"Conda\u5728\u4e2d\u6587\u7528\u6237\u540d\u4e0b\u8fd0\u884c"},"content":{"rendered":"<h2>\u8ba9Conda\u5728\u4e2d\u6587\u7528\u6237\u540d\u4e0b\u8fd0\u884c<\/h2>\n<p>\u672c\u5b9e\u9a8c\u4ec5\u6d4b\u8bd5\u4e8eWindows10\u7cfb\u7edf\u4e2d\uff0c\u7406\u8bba\u4e0a\u8fd9\u4e2a\u65b9\u6cd5\u53ef\u4ee5\u9002\u5e94\u4efb\u4f55\u7cfb\u7edf\uff0c\u6838\u5fc3\u662f\u4fee\u6539.condarc\u6587\u4ef6\u4e2d\u7684\u53c2\u6570\u8def\u5f84\uff0c\u4f7f\u5176\u8131\u79bb\u4e2d\u6587\uff0c\u5173\u4e8e\u5982\u4f55\u4f7f\u7528conda(anaconda,miniconda)\u53ef\u4ee5\u53c2\u7167\u6211\u8fd9\u4e2a\u535a\u5ba2\uff1a<a href=\"https:\/\/www.mustenaka.cn\/index.php\/2019\/06\/29\/condacomandnote\/\">Conda\u547d\u4ee4\u7b14\u8bb0<\/a><!--more--><\/p>\n<h3>1.\u5b89\u88c5<\/h3>\n<p>\u5b89\u88c5\u7684\u65f6\u5019\u4e0d\u8981\u9009\u62e9Just me\uff08\u672c\u7528\u6237\uff09\uff0c\u800c\u662f\u9009\u62e9All\uff08\u6240\u6709\u7528\u6237\uff09\uff0cWindows\u7cfb\u7edf\u548cLinux\u7cfb\u7edf\u7b49\u90fd\u5c5e\u4e8e\u591a\u7528\u6237\u7cfb\u7edf\uff0c\u9009\u62e9Just me\u4f1a\u5728 user\uff08\u7528\u6237\uff09\/\u3010\u4f60\u7684\u7528\u6237\u540d\u3011 \u8fd9\u4e2a\u5730\u65b9\u4e0b\u5c55\u5f00conda\u7684\u5b89\u88c5\u5305\uff0c\u800c\u8fd9\u4e2a\u5730\u65b9\u7531\u4e8e\u4e2d\u6587\u7528\u6237\u540d\u7684\u5173\u7cfb\u662f\u65e0\u6cd5\u6b63\u5e38\u5b89\u88c5\u7684\uff0c\u9009\u62e9All\u7684\u8bdd\u5219\u4f1a\u5b89\u88c5\u5230ProgramData\u4e2d\uff0c\u8fd9\u662f\u4e00\u4e2a\u82f1\u6587\u8def\u5f84\uff0c\u540c\u65f6\u4e5f\u662f\u4e00\u4e2a\u9690\u85cf\u6587\u4ef6\uff0c\u5728\u6211\u4eec\u5f00\u542f\u67e5\u770b\u9690\u85cf\u6587\u4ef6\u4e4b\u540e\u53ef\u4ee5\u76f4\u63a5\u8bbf\u95ee\u5e76\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<blockquote><p>LINUX\u4e0b\u6309Ctrl+H\u53ef\u4ee5\u76f4\u63a5\u67e5\u770b\u9690\u85cf\u6587\u4ef6<\/p>\n<p>Windows\u4e0b\u5728\u6587\u4ef6\u5939\u9009\u9879\u9009\u62e9\u67e5\u770b\uff0c\u4e0b\u62c9\u83dc\u5355\u53ef\u4ee5\u770b\u89c1\u9690\u85cf\u6587\u4ef6\u662f\u5426\u53ef\u89c1\u7684\u9009\u9879<\/p><\/blockquote>\n<h3>2.\u6d4b\u8bd5<\/h3>\n<p>\u6d4b\u8bd5\u4e00\u4e2a\u521b\u5efa\u547d\u4ee4\u6216\u8005\u8ddf\u65b0\u547d\u4ee4\uff0c\u5982conda update -all\uff0c\u4f60\u4f1a\u53d1\u73b0\u56e0\u4e3a\u4e2d\u6587\u7684\u7528\u6237\u540d\uff0c\u5bfc\u81f4\u8def\u5f84\u65e0\u6cd5\u8bc6\u522b\uff0c\u8fd9\u4e2a\u95ee\u9898\u4e5f\u5c06\u5bfc\u81f4\u65e0\u6cd5create\u65b0\u7684\u865a\u62df\u73af\u5883\uff0c\u540c\u65f6\u4e5f\u65e0\u6cd5install\u65b0\u5f97\u5b89\u88c5\u5305\uff0c\u8fd9\u5bfc\u81f4conda\u53d8\u5f97\u5341\u5206\u9e21\u808b\uff08\u4f46\u53cd\u5e94\u4e2d\u4e5f\u5b58\u5728\u90e8\u5206\u8ba1\u7b97\u673a\u7528\u6237\u8bc6\u522b\u6210\u529f\u4e86\u8fd9\u4e2a\u4e2d\u6587\u73af\u5883\uff0c\u5177\u4f53\u539f\u56e0\u4e0d\u660e\uff09<\/p>\n<h3>3.info\u4fe1\u606f<\/h3>\n<p>\u6211\u4eec\u53ef\u4ee5\u5148\u8f93\u5165conda info\u6765\u67e5\u770b\u6211\u4eecconda\u7684\u914d\u7f6e\u4fe1\u606f\uff0c\u5982\u672c\u4eba\u4fe1\u606f\u5982\u4e0b\uff08\u8fd9\u4e2a\u662f\u5df2\u7ecf\u4fee\u6539\u8fc7\u7684\uff09<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">(py37A) C:\\Users\\\u6770&gt;conda info\r\n\r\n     active environment : py37A\r\n    active env location : C:\\ProgramData\\Anaconda3\\envs\\py37A\r\n            shell level : 1\r\n       user config file : C:\\Users\\\u6770\\.condarc\r\n populated config files : C:\\Users\\\u6770\\.condarc\r\n          conda version : 4.7.12\r\n    conda-build version : 3.17.8\r\n         python version : 3.7.3.final.0\r\n       virtual packages : __cuda=10.1\r\n       base environment : C:\\ProgramData\\Anaconda3  (read only)\r\n           channel URLs : https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/pkgs\/main\/win-64\r\n                          https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/pkgs\/main\/noarch\r\n                          https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/pkgs\/free\/win-64\r\n                          https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/pkgs\/free\/noarch\r\n                          https:\/\/repo.anaconda.com\/pkgs\/main\/win-64\r\n                          https:\/\/repo.anaconda.com\/pkgs\/main\/noarch\r\n                          https:\/\/repo.anaconda.com\/pkgs\/r\/win-64\r\n                          https:\/\/repo.anaconda.com\/pkgs\/r\/noarch\r\n                          https:\/\/repo.anaconda.com\/pkgs\/msys2\/win-64\r\n                          https:\/\/repo.anaconda.com\/pkgs\/msys2\/noarch\r\n          package cache : C:\\ProgramData\\Anaconda3\\pkgs\r\n                          D:\\Anaconda3\\pkgs\r\n       envs directories : C:\\ProgramData\\Anaconda3\\envs\r\n                          D:\\Anaconda3\\envs\r\n                          C:\\Users\\\u6770\\.conda\\envs\r\n                          C:\\Users\\\u6770\\AppData\\Local\\conda\\conda\\envs\r\n               platform : win-64\r\n             user-agent : conda\/4.7.12 requests\/2.22.0 CPython\/3.7.3 Windows\/10 Windows\/10.0.18362\r\n          administrator : False\r\n             netrc file : None\r\n           offline mode : False<\/code><\/pre>\n<p>\u4ece\u6574\u4f53\u800c\u8a00\uff0c\u8bfb\u53d6\u4fe1\u606f\u662f<strong>\u81ea\u4e0a\u800c\u4e0b<\/strong>\u7684\uff0c\u4e5f\u5c31\u662f\u8bf4\u8bfb\u53d6\u67d0\u4e00\u6761\u8def\u5f84\uff0c\u4f1a\u4ece\u7b2c\u4e00\u6761\u8bfb\u53d6\uff0c\u5982\u679c\u6210\u529f\u8fb9\u4e0d\u518d\u8bfb\u53d6\u540e\u6587\uff0c\u68c0\u7d22\u73af\u5883\u4e5f\u662f\u540c\u7406\u3002<\/p>\n<h5>\u540d\u8bcd\u5927\u4f53\u89e3\u91ca\u4e00\u4e0b\uff1a<\/h5>\n<ul>\n<li>channel URLs\uff1a\u8868\u793a\u4e0b\u8f7d\u6e90\uff0c\u672c\u4eba\u7531\u4e8e\u63d0\u524d\u66f4\u6362\u7684\u6e05\u534e\u5927\u5b66\u7684\u955c\u50cf\u6e90\u6240\u4ee5\u9996\u9009\u662f\u6e05\u534e\u5927\u5b66\u7684\u5185\u5bb9\uff0c\u56e0\u6b64\u9996\u9009\u68c0\u7d22\u6e05\u534e\u7684\u955c\u50cf\u5185\u5bb9<\/li>\n<li>package cache\uff1a\u8868\u793a\u5305\u7f13\u5b58\uff0c\u610f\u601d\u662f\u6211\u4eec\u9700\u8981\u4e0b\u8f7d\u7684\u5305\u4f1a\u653e\u7f6e\u5728\u4ec0\u4e48\u4f4d\u7f6e\uff0c\u7b2c\u4e8c\u6b21\u4e0b\u8f7d\u5c31\u76f4\u63a5\u4ece\u8fd9\u4e2a\u8def\u5f84\u4e2d\u63d0\u524d\u83b7\u53d6\u800c\u4e0d\u518d\u7f51\u4e0a\u91cd\u65b0\u4e0b\u8f7d\uff08\u8282\u7701\u4e0b\u8f7d\u65f6\u95f4\uff0c\u4f46\u540c\u65f6\u5360\u7528\u8ba1\u7b97\u673a\u5b58\u50a8\uff09\u3010\u672c\u4eba\u7531\u4e8e\u662f\u4e2d\u6587\u8def\u5f84\uff0c\u53d1\u751f\u4e0b\u8f7d\u9519\u8bef\u7684\u6838\u5fc3\u4e4b\u4e00\u5c31\u662f\u8fd9\u91cc\u51fa\u9519\u3011<\/li>\n<li>env directories\uff1a\u73af\u5883\u8def\u5f84\u8868\u793a\u6211\u4eec\u7684\u865a\u62df\u73af\u5883\u9996\u9009\u5b89\u88c5\u5728\u4ec0\u4e48\u4f4d\u7f6e\uff0c\u4e00\u822c\u800c\u8a00\u5b58\u5728\u7528\u6237\u8def\u5f84\u548c\u5168\u5c40\u8def\u5f84\u4e4b\u5206\uff0c\u6309\u7167<strong>\u81ea\u4e0a\u800c\u4e0b<\/strong>\u7684\u68c0\u7d22\u987a\u5e8f\uff0c\u53ef\u4ee5\u7b80\u7565\u7684\u7406\u89e3\u4e3a\u7b2c\u4e00\u6761\u5c31\u662f\u4f60\u7684\u865a\u62df\u73af\u5883\u5b89\u88c5\u7684\u4f4d\u7f6e<\/li>\n<\/ul>\n<p>\u6211\u4eec\u6838\u5fc3\u5c31\u662f\u8981\u4fee\u6539package cache\u7684\u8def\u5f84\u548cenv directories\u7684\u8def\u5f84\u3002<\/p>\n<h3>4.\u4fee\u6539.bashrc<\/h3>\n<p>\u6253\u5f00\u6b64\u7535\u8111\uff0cC\u76d8\uff0c\u627e\u5230\u7528\u6237\uff08\u6709\u65f6\u4e5f\u53ebuser\uff09\uff0c\u8fdb\u5165\u9009\u4e2d\u4f60\u81ea\u5df1\u7684\u7528\u6237\u540d\u6587\u4ef6\u5939<\/p>\n<p>\u9009\u4e2d.bahsrc\u6587\u4ef6\uff0c\u53f3\u952e\u7528\u6587\u6863\u6253\u5f00\uff0c\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9\uff0c\u5177\u4f53\u8def\u5f84\u6839\u636e\u81ea\u5df1\u7535\u8111\u60c5\u51b5\u8fdb\u884c\u914d\u7f6e\u5b89\u88c5\uff0c\u7406\u8bba\u4e0a\u4f60\u8f93\u5165\u4e00\u4e2aD\u76d8\u7684\u8def\u5f84\u4ed6\u4e5f\u4f1a\u81ea\u52a8\u4e0b\u8f7d\u5230D\u76d8\uff0c\u8fd9\u6837\u505a\u53ef\u4ee5\u8282\u7701C\u76d8\u7a7a\u95f4\u7684\u6d6a\u8d39\u3010\u6ce8\u610f\u63d0\u524d\u521b\u5efa\u6587\u4ef6\u5939\u3011\uff0c\u8fd9\u91cc\u53ea\u662f\u63d0\u4f9b\u4e00\u4e2a\u53c2\u8003\uff0c\u5177\u4f53\u8bf7\u81ea\u7531\u53d1\u6325<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">envs_dirs:\r\n  - C:\\ProgramData\\Anaconda3\\envs\r\n  - D:\\Anaconda3\\envs                       \r\npkgs_dirs:\r\n  - C:\\ProgramData\\Anaconda3\\pkgs\r\n  - D:\\Anaconda3\\pkgs<\/code><\/pre>\n<p>\u672c\u4eba\u8fd9\u4e2a\u6587\u4ef6\u5168\u90e8\u7684\u5185\u5bb9\uff08\u5305\u62ec\u8fd8\u6e90\u548c\u4fee\u6539\u54cd\u5e94\u65f6\u95f4\u7b49\u914d\u7f6e\uff0c\u53ef\u4ee5\u53c2\u8003\uff09<\/p>\n<pre class=\"pure-highlightjs\"><code class=\"\" null=\"\">ssl_verify: true\r\nchannels:\r\n  - https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/pkgs\/main\/\r\n  - https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/pkgs\/free\/\r\n  - defaults\r\nenvs_dirs:\r\n  - C:\\ProgramData\\Anaconda3\\envs\r\n  - D:\\Anaconda3\\envs                       \r\npkgs_dirs:\r\n  - C:\\ProgramData\\Anaconda3\\pkgs\r\n  - D:\\Anaconda3\\pkgs\r\n\r\nremote_read_timeout_secs: 600.0\r\nshow_channel_urls: true\r\nreport_errors: true<\/code><\/pre>\n<p>\u4fee\u6539\u5b8c\u6210\u4e4b\u540e\u8bf7update\u8fdb\u884c\u6d4b\u8bd5\u4e00\u4e0b\u3002<\/p>\n<p>\u672c\u6587\u4f7f\u7528Windows10\u8fdb\u884c\u6d4b\u8bd5\uff0c\u7406\u8bba\u4e0aLinux\u7cfb\u7edf\u540c\u7406\u3002<\/p>\n<p>PS\uff1a\u7ecf\u8fc7\u51e0\u5468\u7684\u5b9e\u9645\u4f7f\u7528\uff0c\u53d1\u73b0\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\u3010\u5373Windows\u4f7f\u7528\u7ba1\u7406\u5458\u8fd0\u884c\uff0cLinux\u9700\u8981\u4f7f\u7528root\u8d26\u6237\u7b49\u7c7b\u4f3c\u65b9\u6848\u3011<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8ba9Conda\u5728\u4e2d\u6587\u7528\u6237\u540d\u4e0b\u8fd0\u884c \u672c\u5b9e\u9a8c\u4ec5\u6d4b\u8bd5\u4e8eWindows10\u7cfb\u7edf\u4e2d\uff0c\u7406\u8bba\u4e0a\u8fd9\u4e2a\u65b9\u6cd5\u53ef\u4ee5\u9002\u5e94\u4efb\u4f55\u7cfb [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[12,63],"class_list":["post-529","post","type-post","status-publish","format-standard","hentry","category-ai","tag-ai","tag-conda"],"views":6583,"_links":{"self":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/529","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/comments?post=529"}],"version-history":[{"count":8,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/529\/revisions"}],"predecessor-version":[{"id":552,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/529\/revisions\/552"}],"wp:attachment":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/media?parent=529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/categories?post=529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/tags?post=529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}