Anaconda导致Powershell报错


1
2
3
4
5
6
7
8
. : 无法加载文件 C:\Users\Documents\WindowsPowerShell\profile.ps1,因为在此系
统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?
LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 3
+ . 'C:\Users\Documents\WindowsPowerShell\profile.ps1'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess

记录一下解决方法,以管理员身份运行Powershell,然后输入:

set-executionpolicy remotesigned

输入a,回车,然后大功告成。