pycharm reported an error: Unable to load file...activate.ps1. Because running scripts is prohibited on this system.

       When Pycharm runs python code, the error mentioned in the title is reported. The reason is because of Windows permission execution policy restrictions. The processing method is as follows:

1. Open powershell and enter the get-ExecutionPolicy command to view the current permission execution policy of windows. After pressing Enter, the result will be displayed as Restricted as shown in the figure below.

2. Then enter the set-ExecutionPolicy Bypass command, and the choice of whether to change the execution policy will pop up. Just select all. The specific process is shown in the figure below.

3. Finally, enter the get-ExecutionPolicy command to view the Bypass.

Guess you like

Origin blog.csdn.net/weixin_44110324/article/details/129572876