Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differences between mkvirtualenv and virtualenv for creating virtual environments

I am new to Python virtual environments. Previously I was using the virtualenv command to create virtual environments, but I came across to a tutorial using mkvirtualenv to create a virtual environment.

What is the benefit of mkvirtualenv over virtualenv, and how they are different?

like image 749
jax Avatar asked May 19 '17 06:05

jax


People also ask

What is the difference between venv and virtualenv?

These are almost completely interchangeable, the difference being that virtualenv supports older python versions and has a few more minor unique features, while venv is in the standard library.

What is the difference between virtualenv and virtualenvwrapper?

Virtualenvwrapper is a utility on top of virtualenv that adds a bunch of utilities that allow the environment folders to be created at a single place, instead of spreading around everywhere.

What is the difference between Conda env and virtualenv?

venv is an environment manager for Python . conda is both a package and environment manager and is language agnostic . Whereas venv creates isolated environments for Python development only, conda can create isolated environments for any language (in theory).

How do I use virtualenvwrapper and virtualenv?

This is really simple. Start by changing directory into the root of our project directory, and then use the virtualenv command-line tool to create a new environment: $ mkdir myproject $ cd myproject $ virtualenv env New python executable in env/bin/python Installing setuptools, pip, wheel... done.


1 Answers

virtualenv is a tool that allows you to create isolated Python environments, which can be quite helpful when you have different projects with differing requirements.

mkvirtualenv is command under virtualenvwrapper which is just a wrapper utility around virtualenv that makes it even easier to work with.

For detailed ref:

  1. http://www.silverwareconsulting.com/index.cfm/2012/7/24/Getting-Started-with-virtualenv-and-virtualenvwrapper-in-Python

  2. https://virtualenvwrapper.readthedocs.io/en/latest/

like image 74
Abijith Mg Avatar answered Sep 24 '22 15:09

Abijith Mg