Tag Archives: python 3.5

Create virtual environment with virtualenvwrapper in windows

Suppose you need to work on three different projects project A, project B and project C. project A and project B need python 3 and some required libraries. But for project C you need python 2.7 and dependent libraries.

So best practice for this is to separate those project environments. For creating separate python virtual environment need to follow below steps:

Step 1: Install pip with this command:
python -m pip install -U pip

Step 2: Then install “virtualenvwrapper-win” package by using command (command can be executed windows power shell):

pip install virtualenvwrapper-win

Step 3: Create a new virtualenv environment by using command: mkvirtualenv python_3.5

Step 4: Activate the environment by using command:

workon < environment name> Continue reading Create virtual environment with virtualenvwrapper in windows

Advertisements

Create virtual environment with virtualenvwrapper in Ubuntu 16.04

Suppose you need to work on three different projects project A, project B and project C. project A and project B need python 3 and some required libraries. But for project C you need python 2.7 and dependent libraries.

So best practice for this is to seperate those project environemtns. To create virtual environment you can use below technique:

  1. Virtualenv: Virtualenv is a tool to create isolated Python environments.
  2. Virtualenvwrapper: While virtual environments certainly solve some big problems with package management, they’re not perfect. After creating a few environments, you’ll start to see that they create some problems of their own, most of which revolve around managing the environments themselves. To help with this, the virtualenvwrapper tool was created, which is just some wrapper scripts around the main virtualenv tool.A few of the more useful features of virtualenvwrapper are that it:- Organizes all of your virtual environments in one location;
    – Provides methods to help you easily create, delete, and copy environments; and,
    – Provides a single command to switch between environments
  3. Conda: Conda is a package manager application that quickly installs, runs, and updates packages and their dependencies. Conda is also an environment manager application. A conda environment is a directory that contains a specific collection of conda packages that you have installed.

Continue reading Create virtual environment with virtualenvwrapper in Ubuntu 16.04