Anaconda, conda and virtualenv

Written by Art, June 18, 2017

Install Anaconda

Anaconda is an open data science platform powered by Python. Anaconda comes with distribution of Python and R and includes over 100 of the most popular Python, R and Scala packages for data science.

Use Graphical installer to install Anaconda powered by Python 3.6

Anaconda documentation

Pandas-datareader

pandas-datareader extracts data from various Internet sources into a pandas DataFrame. Docs

Start using pandas-datareader:

import pandas_datareader.data as web

Install latest release version via conda

conda install pandas-datareader

conda install -c anaconda pandas-datareader

Install latest release version via pip

pip install pandas-datareader

Conda

Conda is a package manager, just like pip, is used for updating Anaconda packages.

Conda documentation

If you get an error:

conda is not recognized as internal or external command.

For Windows

Go to:

Go to Control Panel\System and Security\System\Advanced System Settings\Environment Variables

and check path values, your user variable should contain

Path=..\Anaconda3\Scripts

Usually it looks like this:

C:Users\user.user\Anaconda3\Scripts

For Mac

Go to .bashrc, or sometimes to .profile, or.bash_profile and make sure PATH is right.

PATH: PATH="/Users/computer_name/anaconda/bin"

Virtual environments with Conda

Whithin you directory in the terminal/shell, where you want to launch virtualenv, type:

conda create -n env python=3.6 anaconda

to activate virtualenv:

source activate env

to install package:

conda install -n env [package]

to deactivate virtualenv:

source deactivate


Share with:

About author


Art

Art is a FinTech enthusiast who has a great passion for coding and teaching. He earned a M.Sc. from Adelphi University, Garden City, New York. Currently, he develops software for the financial services industry and leads classes and workshops in Python at PracticalProgramming.co

Python 101

This class aims to help beginners to feel justifiably confident to start using Python programming language

Learn more

Python for Data Science

Learn how to apply Python analytics libraries Pandas, NumPy and Matplotlib for Data Science

Learn more

Python Immersive

Become a proficient Python programmer, master programming skills by working on real life projects

Learn more

Web Scraping

We go through the whole process of gathering, storing and analyzing data from the Web

Learn more

Build Web App

This is practical course for those who want to create a Web Application from scratch using Django

Learn more