Pycharm无法加载文件 xx\Scripts\Activate.ps1,系统禁止运行脚本

一、问题现象无法加载文件 D:worktoolsPython/ target=_blank class=infotextkey>PythonPython36Libsite-packagesScriptsactivate.ps1,因为在此系统上禁止运行脚本 。有关详细信息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 abo ut_Execution_Policies 。+ CategoryInfo: SecurityError: (:) [],ParentContainsErrorRecordException+ FullyQualifiedErrorId : UnauthorizedAccess

Pycharm无法加载文件 xx\Scripts\Activate.ps1,系统禁止运行脚本

文章插图
 
二、原因Restricted(防止运行没有数字签名的脚本),要设置成RemoteSigned模式
三、解决措施具体的解决步骤如下:
  1. 以管理员身份运行PowerShell
  2. 输入get-ExecutionPolicy(如果返回Restriced,则继续下述的步骤)
  3. 输入set-ExecutionPolicy RemoteSigned
  4. 输入Y按下回车

Pycharm无法加载文件 xx\Scripts\Activate.ps1,系统禁止运行脚本

文章插图
 

Pycharm无法加载文件 xx\Scripts\Activate.ps1,系统禁止运行脚本

文章插图
 
OK,到此问题就解决了,可以尝试一下哦~~~

【Pycharm无法加载文件 xx\Scripts\Activate.ps1,系统禁止运行脚本】


    推荐阅读