【发布时间】:2022-01-21 05:30:40
【问题描述】:
我是 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中所以你需要使用Activate.ps1
-
现在我收到无法加载模块“venv”的错误。有关更多信息,请运行“Import-Module venv”。
-
我想我是在考虑 windows cmd 提示符。总的来说,它应该有点不同。
标签: python reactjs virtualenv