运行python显示以下错误:
无法加载文件 C:\Users\32973\Documents\WindowsPowerShell\profile.ps1,因为在此系统上禁止运行脚本。
解决办法:
1.以管理员身份运行PowerShell
2.输入:get-ExecutionPolicy
显示:Restricted,这表示状态是禁止的
3.这时输入:set-ExecutionPolicy RemoteSigned 就可以正常运行Python文件了
运行python显示以下错误:
无法加载文件 C:\Users\32973\Documents\WindowsPowerShell\profile.ps1,因为在此系统上禁止运行脚本。
解决办法:
1.以管理员身份运行PowerShell
2.输入:get-ExecutionPolicy
显示:Restricted,这表示状态是禁止的
3.这时输入:set-ExecutionPolicy RemoteSigned 就可以正常运行Python文件了