[JustForFunPython] Isolation tools — “virtualenv”

A Ydobon
1 min readJul 27, 2020

--

Hi folks!

Sometimes we need to be isolated from outer stimulus to perform and finish our projects. Likewise, programs need to be isolated to be tested in different settings and environments. “virtualenv” is as you have already know, shortened term for “virtual environment”. This is one of the most widely used isolation tools, and let’s install it with a few lines of codes!

Photo by Safar Safarov on Unsplash

Let’s say we want to isolate in a folder named ‘my-project-folder’.

In MAC/Linux, we can specify a certain version of python by using ‘ — python’.

cd my-project-folder
virtualenv --python pythone my-venv

And ‘activate’ will literally activate the virtual environment.

source my-venv/bin/activate

In Windows, hm… have no idea yet. Will try later and update!

Thank you for visiting this humble posting and hope you stay safe!

--

--

A Ydobon
A Ydobon

No responses yet