Skip to main content

Posts

Showing posts from 2017

A typical guide to use virtual environment for your python projects.

Virtual Environment is used to create isolated python environment. In simple terms it creates a virtual installation of Python and Pip into some directory. It is separated from your original python installation. Why we need virtual environments? Suppose you are working on some project and that project required more than 2 libraries that are dependent on each other. Generally these libraries are open sourced projects and maintained by different developers community. Now, if any one library gets changed in newer version and it is not backwards compatible and if you accidentally update that library from your global python installation then it might break your project.That's why it is safe to use virtual environments. To create virtual environment in your machine please follow these steps: Make sure you have installed python in your computer.In this guide I will assume you have installed python 3.(make sure to check add to path) Install virtual env via this command $ pip i