繁体   English   中英

我尝试在 python 中运行我的 venv,但是出现错误,终端说 The term '.\venv\Scripts\activate' is not known as the name of a cmdlet

[英]I try to run my venv in python, however I ger errors, terminal says The term '.\venv\Scripts\activate' is not recognized as the name of a cmdlet

我是 react js 开发人员,我想运行代码的后端部分,后端开发人员说我要下载 python 并在 webstorm 终端中运行以下命令。

激活虚拟环境

python3 -m venv venv
.\venv\Scripts\activate
python .\manage.py runserver

当我尝试这样做时,我得到了无法修复的错误。 下面的错误。

.\venv\Scripts\activate : The term '.\venv\Scripts\activate' is not recognized as the name of a cmdlet, function, script file, or operable program. Check 
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:2
+  .\venv\Scripts\activate
+  ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (.\venv\Scripts\activate:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

在此处输入图像描述

请帮我激活 python 服务器

由于您使用的是 PowerShell,请使用以下命令:

.\venv\Scripts\Activate.ps1

确保大小写正确。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM