简体   繁体   中英

How can I install zipline using conda with python 3.5

I am on macOS Sierra 10.12.5

My end goal is to install the zipline python package and get it to run properly. However, I have hit some obstacles and since I am new to Unix and python as well, I thought maybe someone could push me in the right direction.

On the zipline website it says there is support for python 3.5 . I already have python 3.6 installed via conda on my system so I decided to create an environment for the former version.

First, I did conda create -n py35 python=3.5 anaconda in the directory /anaconda/envs/py35 . This installed python 3.5.3 . Then, I use source activate py35 to activate it.

Next, I attempt to install zipline using a suggestion on their website with the command:

conda install -c Quantopian zipline

And I receive this error back:

Fetching package metadata ...........
Solving package specifications: .

UnsatisfiableError: The following specifications were found to be in 
conflict:
  - python 3.5*
  - zipline -> logbook -> python 2.7*
Use "conda info <package>" to see the dependencies for each package.

I'm not sure I fully understand why python 2.7 would be in conflict if I am working from within an environment, I assumed that was the point, so nothing conflicts with other python versions. Also, it says python 3.5* does that mean it's in conflict with itself? Thanks for the help.

As discussed in comment:

pip install zipline

did you give pip install zipline a try. A lot of times conda doesn't work for me, whereas pip does.

--

@VikashSingh Yes, I am trying it now, pip did install zipline but when I attempt to run a buyaapl.py script I get an error No module named pandas.tseries.tools

I have no clue what buyaapl.py is. Please start another question and share the code as well.

PS: Probably you don't have pandas installed in the environment. Try pip install --upgrade pandas

You should run the conda install -c Quantopian zipline after you activated your conda environment. source activate py35

Then, when you see your shell becomes (py35)$ , you can run conda install -c Quantopian zipline again.

ref: http://www.zipline.io/install.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM