简体   繁体   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

I am react js developer and I want to run the backend part of my code, the backend dev said me to download python and run the following commands in webstorm terminal.我是 react js 开发人员,我想运行代码的后端部分,后端开发人员说我要下载 python 并在 webstorm 终端中运行以下命令。

Activate virtual environment激活虚拟环境

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

When I try to do it, I get errors, which I cannot fix.当我尝试这样做时,我得到了无法修复的错误。 The error below.下面的错误。

.\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

在此处输入图像描述

Please help me to activate python server请帮我激活 python 服务器

Since you're using PowerShell, use the following command:由于您使用的是 PowerShell,请使用以下命令:

.\venv\Scripts\Activate.ps1

Make sure the capitalization is correct.确保大小写正确。

暂无
暂无

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

相关问题 术语“\venv\Scripts\activate.ps1”未被识别为 cmdlet、function、脚本文件或可运行程序的名称 - The term '\venv\Scripts\activate.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program 我在 vscode 中激活了 venv 但它没有出现在终端中 - I activate venv in vscode but it doesnt appear in terminal zsh:当我尝试在 venv 中运行应用程序时,中止 python 错误 - zsh: abort python error when I try to run the app in venv "当我尝试使用 venv 激活虚拟环境时出现错误" - When I try to activate a virtual environment with venv I get an error OpenStack CLI Windows 10 "source" and "venv\Scripts\activate" 表示不被识别为内部或外部命令、可运行程序或批处理文件 - OpenStack CLI Windows 10 "source" and "venv\Scripts\activate" says not recognized as an internal or external command, operable program or batch file 无法将术语“ python”识别为cmdlet的名称 - The term 'python' is not recognized as the name of a cmdlet 如何在 Visual Studio 中为 Python 激活 VENV? - How can I activate VENV for Python in Visual Studio? 如何在 python 脚本中激活 venv - How can I activate a venv within a python script 如何在启动 PowerShell 时自动激活 Python venv? - How do I Activate a Python venv Automatically when starting PowerShell? 如何让我的 vscode 终端将我的 venv 用于 python 而不是系统版本? - How can I get my vscode terminal to use my venv for python rather than the system version?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM