Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。
尝试新的跨平台 PowerShell https://aka.ms/pscore6
PS D:\my_python_small_projects\movieland> & D:/python_virtualenv/my_flask/Scripts/Activate.ps1
& : 无法加载文件 D:\python_virtualenv\my_flask\Scripts\Activate.ps1,因为在此系统上禁止运行脚本。有关详细信息
,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 3
+ & D:/python_virtualenv/my_flask/Scripts/Activate.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
PS D:\my_python_small_projects\movieland> & 'D:\python_virtualenv\my_flask\Scripts\python.exe' 'c:\Users\Dontla\.vscode\extensions\ms-python.python-2020.12.424452561\pythonFiles\lib\python\debugpy\launcher' '63259' '--' 'd:\my_python_small_projects\movieland\run.py'
* Serving Flask app "Movieland" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
PS D:\my_python_small_projects\movieland>
解决方法:
win+x
点击Windows PowerShell(管理员)
输入set-executionpolicy remotesigned
,再输入y
确认
然后重新启动程序,没有再报错了