{"id":904,"date":"2021-02-15T17:47:31","date_gmt":"2021-02-15T09:47:31","guid":{"rendered":"http:\/\/www.mustenaka.cn\/?p=904"},"modified":"2021-02-15T18:33:30","modified_gmt":"2021-02-15T10:33:30","slug":"powershellcannotuseconda-activate","status":"publish","type":"post","link":"https:\/\/www.mustenaka.cn\/index.php\/2021\/02\/15\/powershellcannotuseconda-activate\/","title":{"rendered":"powershell\u65e0\u6cd5\u4f7f\u7528conda activate\u547d\u4ee4"},"content":{"rendered":"<p>\u5728Windows10\u4e0a\u9762\uff0cconda\uff08anaconda\u3001miniconda\uff09\u65e0\u6cd5\u4f7f\u7528conda activate\u547d\u4ee4\u5207\u6362\u865a\u62df\u73af\u5883\uff0c\u800c\u53ea\u80fd\u4f7f\u7528cmd\u8fdb\u884c\u5207\u6362\uff08\u5c31\u6211\u4e2a\u4eba\u800c\u8a00\uff0cWindows10\u65f6\u4ee3\u66f4\u52a0\u559c\u6b22\u7528\u66f4\u52a0\u5f3a\u5927\u7684powershell\u8fd0\u884c\u547d\u4ee4\u800c\u975ecmd\u4e86\uff09\uff0c\u800c\u5728\u5fae\u8f6f Windows Terminal \u63a8\u51fa\u4e4b\u540e\uff0c\u4f7f\u7528terminal \u66f4\u52a0\u6709\u5728Linux\u7684\u611f\u89c9\u4e86\u3002<\/p>\n<p><!--more--><\/p>\n<h3>\u786e\u8ba4\u7cfb\u7edf\u53d8\u91cf<\/h3>\n<p>\u9996\u5148\u9700\u8981\u5728\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\u786e\u5b9aanaconda\u7684\u73af\u5883\u6dfb\u52a0\u5230\u4e86path\u91cc\u9762\uff0c\u5171\u6709\u8fd9\u4e94\u4e2a\u5185\u5bb9\uff0c\u5728\u5b89\u88c5\u65f6\u5019\u4f1a\u81ea\u52a8\u521b\u5efa\uff0c\u6ca1\u6709\u7684\u8bdd\u6309\u7167\u8fd9\u4e2a\u6a21\u677f\u4fee\u6539\u81ea\u5df1\u7684\u8be6\u7ec6\u5b89\u88c5\u76ee\u5f55\u8fdb\u884c\u6dfb\u52a0\u5373\u53ef\u3002<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/www.mustenaka.cn\/wp-content\/uploads\/2021\/02\/DEKRC_UMHDH1FTAUT8T.png\" alt=\"\" width=\"546\" height=\"160\" class=\"alignnone size-full wp-image-905\" srcset=\"https:\/\/www.mustenaka.cn\/wp-content\/uploads\/2021\/02\/DEKRC_UMHDH1FTAUT8T.png 546w, https:\/\/www.mustenaka.cn\/wp-content\/uploads\/2021\/02\/DEKRC_UMHDH1FTAUT8T-300x88.png 300w\" sizes=\"(max-width: 546px) 100vw, 546px\" \/><\/p>\n<h3>\u4fee\u6539\u7b56\u7565<\/h3>\n<p>\u63a5\u4e0b\u6765\uff0c\u5c31\u662f\u4fee\u6539powershell\u7b56\u7565\uff0c\u7ba1\u7406\u5458\u542f\u52a8powershell\u4e4b\u540e\u8f93\u5165 set-ExecutionPolicy RemoteSigned \u5e76\u4e14\u786e\u8ba4\u4fee\u6539\u7b56\u7565\u3002<\/p>\n<blockquote><p>\u6267\u884c\u7b56\u7565\u66f4\u6539<br \/>\n\u6267\u884c\u7b56\u7565\u53ef\u5e2e\u52a9\u4f60\u9632\u6b62\u6267\u884c\u4e0d\u4fe1\u4efb\u7684\u811a\u672c\u3002\u66f4\u6539\u6267\u884c\u7b56\u7565\u53ef\u80fd\u4f1a\u4ea7\u751f\u5b89\u5168\u98ce\u9669\uff0c\u5982 https:\/go.microsoft.com\/fwlink\/?LinkID=135170<br \/>\n\u4e2d\u7684 about_Execution_Policies \u5e2e\u52a9\u4e3b\u9898\u6240\u8ff0\u3002\u662f\u5426\u8981\u66f4\u6539\u6267\u884c\u7b56\u7565?<br \/>\n[Y] \u662f(Y) [A] \u5168\u662f(A) [N] \u5426(N) [L] \u5168\u5426(L) [S] \u6682\u505c(S) [?] \u5e2e\u52a9 (\u9ed8\u8ba4\u503c\u4e3a\u201cN\u201d):\u00a0 A<\/p><\/blockquote>\n<p>\u518d\u4e4b\u540e\uff0c\u91cd\u65b0\u5c06conda\u5728powershell\u4e2d\u521b\u5efa\u6fc0\u6d3b\uff0c\u8f93\u5165 conda init powershell \u5373\u53ef\uff0c\u4f1a\u53d1\u73b0\u6709\u4e00\u90e8\u5206\u5141\u8bb8\u7684\u547d\u4ee4\u914d\u7f6e\u53d1\u751f\u4e86\u4fee\u6539\uff0c\u591a\u6570\u662f\u6ca1\u6709\u53d8\u52a8\u7684\u3002<\/p>\n<blockquote><p>no change C:\\Users\\Mumte\\Anaconda3\\Scripts\\conda.exe<br \/>\nno change C:\\Users\\Mumte\\Anaconda3\\Scripts\\conda-env.exe<br \/>\nno change C:\\Users\\Mumte\\Anaconda3\\Scripts\\conda-script.py<br \/>\nno change C:\\Users\\Mumte\\Anaconda3\\Scripts\\conda-env-script.py<br \/>\nno change C:\\Users\\Mumte\\Anaconda3\\condabin\\conda.bat<br \/>\nno change C:\\Users\\Mumte\\Anaconda3\\Library\\bin\\conda.bat<br \/>\nno change C:\\Users\\Mumte\\Anaconda3\\condabin\\_conda_activate.bat<br \/>\nno change C:\\Users\\Mumte\\Anaconda3\\condabin\\rename_tmp.bat<br \/>\nno change C:\\Users\\Mumte\\Anaconda3\\condabin\\conda_auto_activate.bat<br \/>\nno change C:\\Users\\Mumte\\Anaconda3\\condabin\\conda_hook.bat<br \/>\nno change C:\\Users\\Mumte\\Anaconda3\\Scripts\\activate.bat<br \/>\nno change C:\\Users\\Mumte\\Anaconda3\\condabin\\activate.bat<br \/>\nno change C:\\Users\\Mumte\\Anaconda3\\condabin\\deactivate.bat<br \/>\nmodified C:\\Users\\Mumte\\Anaconda3\\Scripts\\activate<br \/>\nmodified C:\\Users\\Mumte\\Anaconda3\\Scripts\\deactivate<br \/>\nmodified C:\\Users\\Mumte\\Anaconda3\\etc\\profile.d\\conda.sh<br \/>\nmodified C:\\Users\\Mumte\\Anaconda3\\etc\\fish\\conf.d\\conda.fish<br \/>\nno change C:\\Users\\Mumte\\Anaconda3\\shell\\condabin\\Conda.psm1<br \/>\nmodified C:\\Users\\Mumte\\Anaconda3\\shell\\condabin\\conda-hook.ps1<br \/>\nno change C:\\Users\\Mumte\\Anaconda3\\Lib\\site-packages\\xontrib\\conda.xsh<br \/>\nmodified C:\\Users\\Mumte\\Anaconda3\\etc\\profile.d\\conda.csh<br \/>\nmodified C:\\Users\\Mumte\\Documents\\WindowsPowerShell\\profile.ps1<\/p>\n<p>&nbsp;<\/p>\n<p>==&gt; For changes to take effect, close and re-open your current shell. &lt;==<\/p><\/blockquote>\n<p>\u6700\u540e\u91cd\u542f\u4e00\u4e0bpowershell\uff0c\u4e4b\u540e\u6b63\u5e38\u542f\u52a8 powershell \u5373\u53ef\u770b\u5230\u5982\u4e0b\u5185\u5bb9\uff0c\u5c31\u8868\u793aconda\u5e94\u7528\u6210\u529f\u4e86\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.mustenaka.cn\/wp-content\/uploads\/2021\/02\/RU4O5SETH4ZMWRX_HY.png\" alt=\"\" width=\"1129\" height=\"631\" class=\"alignnone size-full wp-image-906\" srcset=\"https:\/\/www.mustenaka.cn\/wp-content\/uploads\/2021\/02\/RU4O5SETH4ZMWRX_HY.png 1129w, https:\/\/www.mustenaka.cn\/wp-content\/uploads\/2021\/02\/RU4O5SETH4ZMWRX_HY-300x168.png 300w, https:\/\/www.mustenaka.cn\/wp-content\/uploads\/2021\/02\/RU4O5SETH4ZMWRX_HY-1024x572.png 1024w, https:\/\/www.mustenaka.cn\/wp-content\/uploads\/2021\/02\/RU4O5SETH4ZMWRX_HY-768x429.png 768w\" sizes=\"(max-width: 1129px) 100vw, 1129px\" \/><\/p>\n<ul>\n<li>\u4f18\u70b9\uff1a\u53ef\u4ee5\u81ea\u7531\u8fdb\u884cactivate\u5207\u6362\u865a\u62df\u73af\u5883\u4e86\u3002<\/li>\n<li>\u7f3a\u70b9\uff1a\u989d\u5916\u52a0\u8f7d\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u9700\u8981\u66f4\u957f\u65f6\u95f4\u6253\u5f00\uff08\u589e\u52a0\u4e86\u51e0\u6beb\u79d2\u7684\u533a\u522b\uff09<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u5728Windows10\u4e0a\u9762\uff0cconda\uff08anaconda\u3001miniconda\uff09\u65e0\u6cd5\u4f7f\u7528conda ac [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,71],"tags":[31,84],"class_list":["post-904","post","type-post","status-publish","format-standard","hentry","category-python","category-windows","tag-python","tag-windows"],"views":7419,"_links":{"self":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/904","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=904"}],"version-history":[{"count":3,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/904\/revisions"}],"predecessor-version":[{"id":912,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/posts\/904\/revisions\/912"}],"wp:attachment":[{"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/media?parent=904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/categories?post=904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mustenaka.cn\/index.php\/wp-json\/wp\/v2\/tags?post=904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}