【发布时间】:2023-02-12 01:40:14
【问题描述】:
在 pycharm 中加载 python 文件时,我收到以下警告,之前它不存在,print('Hello') 也按预期工作,但我无法安装 django。
File C:\Users\abhi\PycharmProjects\django_apps\venv\Scripts\activate.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see
about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
+ CategoryInfo : SecurityError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnauthorizedAccess
【问题讨论】:
-
您是否尝试阅读 URL?
-
请注意,此错误与 Python 无关,而是与 PowerShell 脚本有关。
-
是的,我已经尝试了那里给出的命令,但收到另一个错误 -
'Set-ExecutionPolicy' is not recognized as an internal or external command, operable program or batch file.
标签: python error-handling pycharm virtualenv sys