Reputation: 1
Error: PS C:\Users\ARYAN\projects\project1> workon test
workon : The term 'workon' 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:1
+ CategoryInfo : ObjectNotFound: (workon:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Upvotes: 0
Views: 1276
Reputation: 25
Try this :- 1.) For Creating Virtualenv
py -m venv project_name
2.) For activating the Project to work on
.\project_name\scripts\activate
Upvotes: 0
Reputation: 1
workon didn't work for me also. So, I tried another way to activate my virtual environment. Press Ctrl+Shift+P then select Python: Select Interpreter. then choose your environment. If you can't find your environment from the list, you can enter the interpreter paths, for example, "C:\Users\user\venv\Scripts\python.exe"
Finally, reopen VS and voila!
check out their documentation https://code.visualstudio.com/docs/python/environments
Upvotes: 0