-1

When i try activate my virtual environment in CMD, doesn't exit any problem but in PowerShell i'm having that error:

PS C:\Users\Burak\desktop\my-site\myenv\Scripts> activate.bat
activate.bat : The term 'activate.bat' is not recognized as the name of a cmdlet, function, script file, or operable program. Check t
he spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ activate.bat
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (activate.bat:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundExceptionenter code here
HzStark
  • 1
  • 2
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – itprorh66 Apr 05 '22 at 19:23

1 Answers1

0

try activate or ./activate instead activate.bat if it don't help then try this:

You need to set windows execution policies. According to official documentation of virtualenv.

Run in powershell

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
> -Scope CurrentUse

Now you can activate virtual env. using \Scripts\Activate.ps1

Hope it solves it!

Vitaliy Korolyk
  • 182
  • 2
  • 6