{"id":415,"date":"2022-09-21T13:08:29","date_gmt":"2022-09-21T05:08:29","guid":{"rendered":"http:\/\/blog.yuekegu.com\/?p=415"},"modified":"2022-09-21T13:08:29","modified_gmt":"2022-09-21T05:08:29","slug":"conda-channel%e7%9a%84%e9%95%9c%e5%83%8f%e8%ae%be%e7%bd%ae%ef%bc%88%e8%ae%be%e7%bd%ae%e5%8f%af%e7%94%a8%e6%b8%85%e5%8d%8e%e6%ba%90%ef%bc%89","status":"publish","type":"post","link":"https:\/\/book.yuekegu.com\/index.php\/2022\/09\/21\/conda-channel%e7%9a%84%e9%95%9c%e5%83%8f%e8%ae%be%e7%bd%ae%ef%bc%88%e8%ae%be%e7%bd%ae%e5%8f%af%e7%94%a8%e6%b8%85%e5%8d%8e%e6%ba%90%ef%bc%89\/","title":{"rendered":"conda channel\u7684\u955c\u50cf\u8bbe\u7f6e\uff08\u8bbe\u7f6e\u53ef\u7528\u6e05\u534e\u6e90\uff09"},"content":{"rendered":"\n<p>\u6587\u7ae0\u8f6c\u81ea\uff1ahttps:\/\/blog.csdn.net\/weixin_39278265\/article\/details\/84782550<\/p>\n\n\n\n<p>\u524d\u8a00<br>\n\u4eca\u5929\u5728\u4e0b\u8f7dOpenCV\u7684\u65f6\u5019\u53d1\u73b0\u6e05\u534e\u7684conda channel\u955c\u50cf\u5df2\u7ecf\u4e0d\u80fd\u7528\u4e86\uff0c\u6545\u5728\u6b64\u8bb0\u5f55\uff1a<br>\n1\uff09\u5982\u4f55\u663e\u793a\u6240\u6709channel\uff1b<br>\n2\uff09\u5982\u4f55\u66f4\u6362channel\u3002<\/p>\n\n\n\n<p>1 \u663e\u793a\u6240\u6709channel<br>\n\u9996\u5148\uff0cconda config &#8211;show\u80fd\u591f\u663e\u793a\u51fa\u6240\u6709conda\u7684config\u4fe1\u606f\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u6211\u4eec\u53ea\u60f3\u770bchannels\u7684\u4fe1\u606f\uff0c\u8f93\u5165conda config &#8211;show channels\u5373\u53ef\uff0c\u5982\u4e0b\uff1a<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(base) C:\\Users\\dehen>conda config --show channels\nchannels:\n  - https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/cloud\/conda-forge\/\n  - defaults<\/code><\/pre>\n\n\n\n<p>\u73b0\u5728\u6211\u4eec\u6709\u4e24\u4e2a\u6e90\uff0c\u4e00\u4e2a\u6e05\u534e\u955c\u50cf\uff0c\u4e00\u4e2adefauls\u9ed8\u8ba4\u4e0b\u8f7d\u6e90\u3002<\/p>\n\n\n\n<p>\u7136\u800c\u8fd9\u4e2a\u6e05\u534e\u6e90\u5df2\u7ecf\u4e0d\u80fd\u7528\u4e86\uff0c\u6211\u5728\u4e0b\u8f7dopencv\u7684\u65f6\u5019\uff0c\u8f93\u5165\uff1a<code>conda install opencv<\/code>\uff0c\u4f46\u662f\u62a5\u9519\uff1a<\/p>\n\n\n\n<p>(base) C:\\Users\\dehen&gt;conda install opencv<br>\nSolving environment: failed<\/p>\n\n\n\n<p>CondaHTTPError: HTTP 000 CONNECTION FAILED for url <a href=\"https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/cloud\/conda-forge\/win-64\/repodata.json\">https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/cloud\/conda-forge\/win-64\/repodata.json<\/a><br>\nElapsed: &#8211;<\/p>\n\n\n\n<p>An HTTP error occurred when trying to retrieve this URL.<br> HTTP errors are often intermittent, and a simple retry will get you on your way.<br> ConnectionError(ReadTimeoutError(&#8220;HTTPSConnectionPool(host=&#8217;mirrors.tuna.tsinghua.edu.cn&#8217;, port=443): Read timed out.&#8221;))<br><\/p>\n\n\n\n<p>\u6240\u4ee5\u6211\u6253\u7b97\u5220\u9664\u8fd9\u4e2a\u6e90\u3002<\/p>\n\n\n\n<p>2 \u79fb\u9664\u6e05\u534e\u955c\u50cf<br> \u8f93\u5165\uff1aconda config &#8211;remove channels https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/cloud\/conda-forge\/<br> \u8fd9\u4e2a\u547d\u4ee4\u662f\u4e3a\u4e86\u79fb\u9664\u4e4b\u524dconda config &#8211;show channels\u663e\u793a\u7684\u6e05\u534e\u6e90\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>(base) C:\\Users\\dehen>conda config --remove channels  https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/cloud\/conda-forge\/\n\n(base) C:\\Users\\dehen>conda config --show channels\nchannels:\n  - defaults\n\n(base) C:\\Users\\dehen>\n<\/code><\/pre>\n\n\n\n<p>\u8fd9\u65f6\u5019\u518d\u8fd0\u884cconda config &#8211;show channels\u4f1a\u53d1\u73b0\u6e05\u534e\u6e90\u5df2\u7ecf\u88ab\u5220\u9664\u4e86<\/p>\n\n\n\n<p>3 \u6dfb\u52a0\u53ef\u7528\u7684\u6e05\u534e\u6e90<br>\n\u53c2\u8003[4]\uff0c\u6211\u53d1\u73b0\u81ea\u5df1\u4e4b\u524d\u5b89\u88c5\u7684\u6e05\u534e\u6e90\u7684\u5730\u5740https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/cloud\/conda-forge\/ \u662f\u6e05\u534e\u7ef4\u62a4\u7684conda\u4e09\u65b9\u6e90\u4e4b\u4e00conda-forge\u7684\u955c\u50cf\uff0c\uff0c\uff0c\u6b64\u5916\u6e05\u534e\u8fd8\u6709\u5f88\u591a\u53ef\u7528\u7684\u6e90\u3002<\/p>\n\n\n\n<p>\u6240\u4ee5\u6211\u6839\u636e\u5b98\u7f51\u6307\u793a\u8fdb\u884c\u4e86\u6dfb\u52a0\uff1a<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>conda config --add channels https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/pkgs\/free\/\nconda config --add channels https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/pkgs\/main\/\nconda config --set show_channel_urls yes\n<\/code><\/pre>\n\n\n\n<p>conda config &#8211;set show_channel_urls yes\u7684\u610f\u601d\u662f\u4ecechannel\u4e2d\u5b89\u88c5\u5305\u65f6\u663e\u793achannel\u7684url\uff0c\u8fd9\u6837\u5c31\u53ef\u4ee5\u77e5\u9053\u5305\u7684\u5b89\u88c5\u6765\u6e90\u4e86\u3002<\/p>\n\n\n\n<p>4 \u4e0b\u8f7dopencv<br>\n\u5728\u6dfb\u52a0\u597d\u8fd9\u4e2a\u6e90\uff08channel\uff09\u4e4b\u540e\uff0c\u6211\u91cd\u65b0\u8fd0\u884cconda install opencv\uff0c\u679c\u7136\u80fd\u591f\u6210\u529f\u4e0b\u8f7d\uff01\uff01\uff01<\/p>\n\n\n\n<p>\u4f46\u662f\u4e2d\u95f4\u7adf\u7136\u662f\u81ea\u52a8\u5b89\u88c5\uff0c\u5728\u5b89\u88c5\u524d\u7684\u786e\u8ba4[Y\/N]\u7684\u65f6\u5019\uff0cconda\u76f4\u63a5\u8df3\u8fc7\u4e86\uff0c\u9ed8\u8ba4\u662fY\u3002\u3002\u3002<\/p>\n\n\n\n<p>\u8fd9\u8ba9\u6211\u975e\u5e38\u96be\u53d7\uff0c\u6240\u4ee5\u6211\u8fd0\u884c\u4e86\uff1a<br>\nconda config &#8211;set always_yes false<br>\n\uff08\u8fd9\u91cc\u7684\u610f\u601d\u662f\u5b89\u88c5\u786e\u8ba4\u4e2d\uff0c\u4e0d\u9ed8\u8ba4yes\uff0c\u800c\u662f\u7531\u6211\u6765\u51b3\u5b9a\uff09<\/p>\n\n\n\n<p>5 \u4e00\u4e9b\u5176\u4ed6\u7684conda\u6307\u4ee4<br>\nconda install &lt;\u5305\u540d&gt; \u5b89\u88c5\u6307\u5b9a\u5305<br>\nconda remove &lt;\u5305\u540d&gt; \u79fb\u9664\u6307\u5b9a\u5305<br>\nconda update &lt;\u5305\u540d&gt; \u66f4\u65b0\u6307\u5b9a\u5305<\/p>\n\n\n\n<p>\u53c2\u8003\u6587\u732e<br>\n[1] Annaconda \u589e\u52a0\u5220\u9664\u955c\u50cf channel, \u4ee5\u53ca\u5176\u4ed6python\u5305\u5b89\u88c5\u89e3\u51b3\u529e\u6cd5 https:\/\/blog.csdn.net\/mtj66\/article\/details\/57074986<\/p>\n\n\n\n<p>\u6700\u5f00\u59cb\u662f\u770b\u5230\u8fd9\u91cc\u7684\u8bc4\u8bba\uff0c\u53d1\u73b0\u6e05\u534e\u7684\u6e90\u7528\u4e0d\u4e86\u3002<br>\n[2] conda\u5e38\u7528\u547d\u4ee4\u8be6\u89e3 https:\/\/www.jianshu.com\/p\/484cfbf45ed3<\/p>\n\n\n\n<p>\u5728\u8fd9\u91cc\u5b66\u5230\u4e86\u4e00\u4e9bconda\u7684\u547d\u4ee4<br>\n[3] [\u52a0\u901f]\u4e3aconda\u6dfb\u52a0\u56fd\u5185\u955c\u50cf https:\/\/www.aliyun.com\/jiaocheng\/459144.html<\/p>\n\n\n\n<p>\u5728\u8fd9\u91cc\u53d1\u73b0\u539f\u6765\u6211\u4e4b\u524d\u6dfb\u52a0\u7684\u6e05\u534e\u6e90\uff0c\u548c\u771f\u6b63\u7684\u6e05\u534e\u6e90\u4e0d\u4e00\u6837\uff0c\u8fd9\u4fc3\u4f7f\u6211\u8fdb\u4e00\u6b65\u5bfb\u627e\u53ef\u7528\u7684\u6e05\u534e\u6e90\u3002<br>\n[4] Anaconda \u955c\u50cf\u4f7f\u7528\u5e2e\u52a9 https:\/\/mirrors.tuna.tsinghua.edu.cn\/help\/anaconda\/<\/p>\n\n\n\n<p>\u8fd9\u91cc\u662f\u6e05\u534e\u6e90\u7684\u5b98\u7f51\uff0c\u6211\u627e\u5230\u4e86\u53ef\u7528\u7684\u6e05\u534e\u6e90\u5e76\u8fdb\u884c\u4e86\u5b89\u88c5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u8f6c\u81ea\uff1ahttps:\/\/blog.csdn.net\/weixin_39278265\/article\/details\/84782550 \u524d\u8a00 \u4eca\u5929\u5728\u4e0b\u8f7dOpenCV\u7684\u65f6\u5019\u53d1\u73b0\u6e05\u534e\u7684conda channel\u955c\u50cf\u5df2\u7ecf\u4e0d\u80fd\u7528\u4e86\uff0c\u6545\u5728\u6b64\u8bb0\u5f55\uff1a 1\uff09\u5982\u4f55\u663e\u793a\u6240\u6709channel\uff1b 2\uff09\u5982\u4f55\u66f4\u6362channel\u3002 1 \u663e\u793a\u6240\u6709channel \u9996\u5148\uff0cconda config &#8211;show\u80fd\u591f\u663e\u793a\u51fa\u6240\u6709conda\u7684config\u4fe1\u606f\u3002 \u5982\u679c\u6211\u4eec\u53ea\u60f3\u770bchannels\u7684\u4fe1\u606f\uff0c\u8f93\u5165conda config &#8211;show channels\u5373\u53ef\uff0c\u5982\u4e0b\uff1a \u73b0\u5728\u6211\u4eec\u6709\u4e24\u4e2a\u6e90\uff0c\u4e00\u4e2a\u6e05\u534e\u955c\u50cf\uff0c\u4e00\u4e2adefauls\u9ed8\u8ba4\u4e0b\u8f7d\u6e90\u3002 \u7136\u800c\u8fd9\u4e2a\u6e05\u534e\u6e90\u5df2\u7ecf\u4e0d\u80fd\u7528\u4e86\uff0c\u6211\u5728\u4e0b\u8f7dopencv\u7684\u65f6\u5019\uff0c\u8f93\u5165\uff1aconda install opencv\uff0c\u4f46\u662f\u62a5\u9519\uff1a (base) C:\\Users\\dehen&gt;conda install opencv Solving environment: failed CondaHTTPError: HTTP 000 CONNECTION FAILED for url https:\/\/mirrors.tuna.tsinghua.edu.cn\/anaconda\/cloud\/conda-forge\/win-64\/repodata.json Elapsed: &#8211; An HTTP error occurred when trying [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32,13],"tags":[],"class_list":["post-415","post","type-post","status-publish","format-standard","hentry","category-anaconda","category-python"],"_links":{"self":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts\/415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/comments?post=415"}],"version-history":[{"count":0,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/posts\/415\/revisions"}],"wp:attachment":[{"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/media?parent=415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/categories?post=415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/book.yuekegu.com\/index.php\/wp-json\/wp\/v2\/tags?post=415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}