简体   繁体   中英

zipline error. No module named zipline

I installed zipline package via Enthought Cantopy. Now I try to run a script using it in command prompt, but get error ImportError: No module named zipline .

I also tried to run the same code using IPython, with the same output.

I think it is related to python virtual environments, but don't know how to fix that.

I figured it out. The problem was in the version of python I have. I have 32-bit python and Enthought Cantopy with 64 bit python, installed zipline package was under 64 bit python while command prompt was using 32 bit version. Installing 64 bit python fixed the issue.

These are the Requirements/ Steps to Make Zipline Work:

  1. Install Microsoft Visual C++ 2010 Express
  2. Download and install python 3.4
  3. Download zipline from github and Extract in C:/
  4. Set Anaconda as project interpreter
  5. Since zipline is compatible with Python 3.4, you need to create an environment with Python 3.4
  6. Run this command in console of IDE: $conda create -n python34 python=3.4 anaconda (replace py34 with the location of python34 folder)
  7. Now run this command in console: $activate python34 #Activates the python 3.4 environment
  8. $pip install -e C:\\GitHub\\zipline (Directory where you extracted zipline)
  9. Ingest data from quandl with below command $zipline ingest

Hope this helps others who visit this page!

The latest Zipline-Trader version was released. For stable version pip install zipline-trader For more info follow docs for installation.

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