Installing Virtualenv on Windows, MacOX, Linux

PHOTO EMBED

Mon Oct 18 2021 14:15:45 GMT+0000 (UTC)

Saved by @chisomloius ##python ##for-loop ##if-statements

STEP 1: UNIVERSAL INSTALL THE VIRTUAL ENV PACKAGE ON YOUR TERMINA
$ pip install virtualenv // this installs the virtualenv

STEP 2: MOVE TO THE DIRECTORY OF YOUR CHOICE 
$ cd Documents/chisomloius/Data-labelling //for example


STEP 3: CREATE THE VIRTUAL ENV NAME OF YOUR CHOICE //
$ virtualenv [name of virtual environment] or python -m virtualenv [name of virtual environment] //this create a directory with the name
$ virtualenv env or python -m virtualenv env //this create a directory with the name 'env'


STEP 4: ACTIVATE/DEACTIVATE VIRTUAL ENV
$ Scripts\activate // use this to activate for command prompt
$ Scripts\activate.ps1 // use this to activate for Powershell
$ source bin/activate // use this to MacOSX and Linux
---------------------------------
$ deactivate // deactiate virtaul env

STEP 5: ADDING OTHER PACKAGES ON THE VIRTUAL ENVIRONMENT OR USING THE REQUIREMENT FILE
pip install -r requirements.txt //import more than one package
pip install pageName


content_copyCOPY