Python virtualenv

During my first few weeks of learning Python, I ran into the concept of virtualenv which most experts school of thought suggest is the best way of developing with Python.

Virtualenv provides you with a sandbox which keeps your global Python installation pristine. The step is real simple. You just need to have virtualenv installed in your system and you’re good to go.

This command will create a venv directory in your current path. Inside you will find 3 sub-directories: bin, include and lib. The bin folder will have your Python executable.

The first thing you have to do is to activate that executable. You can do this in 2 ways:

If you wanted to use Python 3 instead, you can use the –python option and supply with the Python3 value or you can provide the actual Python3 executable, depending on the version which you have:

That’s all she wrote.