How to Make Virtual Environments Using Anaconda in Python

From WikiHTP

A powerful alternative to virtualenv is Anaconda - a cross-platform, pip-like package manager bundled with features for quickly making and removing virtual environments. After installing Anaconda, here are some commands to get started:

Create an environment[edit]

conda create --name <envname> python=<version>

where <envname> in an arbitrary name for your virtual environment, and <version> is a specific Python version you wish to set up.

Activate and deactivate your environment[edit]

# Linux, Mac
source activate <envname>                            
source deactivate

or

# Windows
activate <envname>                                    
deactivate

View a list of created environments[edit]

conda env list

Remove an environment[edit]

conda env remove -n <envname>

Sources[edit]

Find more commands and features in the official conda documentation.

About This Tutorial

This page was last edited on 28 January 2019, at 07:35.