'I can't activate my virtual environment in PowerShell
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
Solution 1:[1]
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 CurrentUseNow you can activate virtual env. using \Scripts\Activate.ps1
Hope it solves it!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Vitaliy Korolyk |
