zipline installation from Quantopian modifies Anaconda

820 Views Asked by At

I am working with Anaconda with python 2.7. In order to do algorithmic trading I wanted to install 'zipline' package using conda giving command as

conda install -c Quantopian Zipline

from Anaconda prompt. After 'Solving environment' message, I got 'Package Plan' which contains packages which will be installed, removed, updated and downgraded. I was astonished to see that it will remove 'anaconda: 5.2.0-py27_3' and downgrade

  • networkx: 2.1-py27_0 to 1.11-py27_1;
  • numpy: 1.14.3-py27h911edcf_1 to 1.11.3-py27hc42714f_10;
  • numpy-base: 1.14.3-py27h917549b_1 to 1.11.3-py27h2753ae9_10;
  • pandas: 0.23.0-py27h39f3610_0 to 0.22.0-py27hc56fc5f_0.

I canceled the installation.

I have a couple of question here.

  1. Why at all it is necessary for any package installation to remove package 'Anaconda' and downgrade packages like 'numpy', 'pandas' etc.?
  2. Will this action not jeopardize my other python activities?
  3. Shall I go ahead or restrain from installing the packages like this?
1

There are 1 best solutions below

1
On
  1. Zipline doesn't currently support the latest versions of packages like panda, numpy etc. which causes the messages above.

  2. Well, yes it could make trouble, especially if your other python activities need the latest version of those packages.

  3. Please don't go ahead with the installation like this. I'll explain the best available solution below.

Solution:

Create an environment for Zipline. Let's say (for convenience only) Zipline supports Python 3.5 but you have only installed Python 2.7 on your machine. So you can create a sandbox-like conda-environment for Python 3.5. It's very straight forward, just use the following commands:

$ conda create -n env_zipline python=3.5

After your isolated environment called env_zipline was created, you have to activated it by using the following command:

$ activate env_zipline

You can install Zipline now by running

(env_zipline)$ conda install -c Quantopian zipline

When you finished your work with zipline you can deactivate the environment for zipline by using the following command:

(env_zipline)$ deactivate

Hope it helps. If your need further information you can check the more detailed documentation of zipline (the steps above are included): http://www.zipline.io/install.html