1.首先在Vs Code的terminal中输入:
py -3 -m venv .venv
.venv\scripts\activate
2.一般报错如下:
VS Code上配置python虚拟环境
3.解决方法:
第一步:以管理员身份运行powershell (必须管理员身份方法:https://jingyan.baidu.com/article/09ea3ede40cc2dc0aede392c.html)
第二步:执行:get-ExecutionPolicy,回复Restricted,表示状态是禁止的。
第三步:执行:set-ExecutionPolicy RemoteSigned
第四步:选择Y,回车。

3.OK,解决

相关文章:

  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2021-08-18
  • 2021-09-13
  • 2021-12-26
猜你喜欢
  • 2021-07-06
  • 2021-04-04
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2021-09-02
  • 2021-06-26
相关资源
相似解决方案