简体   繁体   中英

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.

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

Since you're using PowerShell, use the following command:

.\venv\Scripts\Activate.ps1

Make sure the capitalization is correct.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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