Installing Virtualenv on Windows, MacOX, Linux

PHOTO EMBED

Mon Oct 18 2021 14:15:45 GMT+0000 (Coordinated Universal Time)

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 e.g virtual_env
$ virtualenv env or python -m virtualenv virtual_env //this create a directory with the name 'virtual_env'


STEP 4: ACTIVATE/DEACTIVATE VIRTUAL ENV
$ .\/virtual_env/scripts/activate // use this to activate for command prompt
$ .\/virtual_env/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