Skip to content

Instantly share code, notes, and snippets.

@za
Last active August 29, 2015 14:24
Show Gist options
  • Save za/cb77fca019d2de88c5bb to your computer and use it in GitHub Desktop.
Save za/cb77fca019d2de88c5bb to your computer and use it in GitHub Desktop.
Python3 Pandas and IPython3 in a Virtual Environment

Instead of installing in a system-wide environment, we can setup in a localidzed, separated environment.

Create new virtualenv:

$ virtualenv --python=`which python3` open-data-crunch

Activate open-data-crunch virtualenv

$ cd open-data-crunch
$ . bin/activate
(open-data-crunch) $ 

Install IPython3

(open-data-crunch) $ pip install ipython
Collecting ipython
  Downloading ipython-3.2.0-py3-none-any.whl (3.4MB)
    100% |████████████████████████████████| 3.4MB 144kB/s 
Installing collected packages: ipython
Successfully installed ipython-3.2.0

Install pandas

(open-data-crunch) $ pip install pandas
Collecting pandas
  Using cached pandas-0.16.2.tar.gz
Collecting python-dateutil>=2 (from pandas)
  Using cached python_dateutil-2.4.2-py2.py3-none-any.whl
Collecting pytz>=2011k (from pandas)
  Using cached pytz-2015.4-py2.py3-none-any.whl
Collecting numpy>=1.7.0 (from pandas)
  Using cached numpy-1.9.2.tar.gz
Collecting six>=1.5 (from python-dateutil>=2->pandas)
  Using cached six-1.9.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, pytz, numpy, pandas
  Running setup.py install for numpy
  Running setup.py install for pandas
Successfully installed numpy-1.9.2 pandas-0.16.2 python-dateutil-2.4.2 pytz-2015.4 six-1.9.0

Install other dependencies:

(open-data-crunch) $ pip install tornado pyzmq jinja2 matplotlib
Collecting tornado
  Downloading tornado-4.2.tar.gz (433kB)
    100% |████████████████████████████████| 434kB 753kB/s 
Collecting pyzmq
  Downloading pyzmq-14.7.0.tar.gz (1.0MB)
    100% |████████████████████████████████| 1.0MB 417kB/s 
Collecting jinja2
  Downloading Jinja2-2.7.3.tar.gz (378kB)
    100% |████████████████████████████████| 380kB 728kB/s 

@za
Copy link
Author

za commented Jul 5, 2015

But it turns out, installing in a localized virtualenv is not as simple as it is. Just like what Julia Evans wrote.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment