Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

virtualenv to path on Windows 10

I have installed virtualenv (if I type "pip list" there is virtualenv (15.1.0)) and when I try to use it throws an error:

virtualenv : The term 'virtualenv' 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

+ virtualenv  
+ ~~~~~~~~~~  
   + CategoryInfo          : ObjectNotFound: (virtualenv:String) [], CommandNotFoundException
   + FullyQualifiedErrorId : CommandNotFoundException

I think I need to add virtualenv to path, which I've tried without success.

like image 339
Maxim Melnyk Avatar asked Nov 28 '22 06:11

Maxim Melnyk


1 Answers

To install :

pip install --user virtualenv

To create a virtual environment (venv):

python -m virtualenv venv

To activate:

-cd venv
-cd Scripts
-activate.bat

to deactivate:

-deactivate.bat

to run venv again just type activate.bat

Note: had problems with the platformio integrated terminal, used cmd from within the folder. Hope this helps!

like image 175
Yousuf.Siddiqui Avatar answered Dec 04 '22 04:12

Yousuf.Siddiqui