Back to Community
Install zipline on win-64

I'd like to install a Python module named "zipline", which is only available for win-32 (Isn't it?). The following command line for installation can only browse for win-64 version:

$ conda install -c Quantopian zipline

So far, I have not seen an option to force the command to search for win-32. If you find one, please share me. Thank you.

I also tried $ pip install zipline, but it returns an error message "Unable to find vcvarsall.bat". Should I install MS Visual C++ first?.

20 responses

I just found the ultimate solutions compiled here. Enjoy vcvarsall.bat !
http://www.pandastack.com/unable-to-find-vcvarsall-bat-how-to-fix-on-windows/

Glad the source install worked. I could be mistaken, but I imagine you need to be using win-32 conda to install win-32 packages. The miniconda download page offers both.

Because the source install on windows can be difficult, we're also currently working to automate building windows (64) conda packages for zipline, but we have finished the project yet!

Best,
Rich

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

I am still unable to install the win-32 version of zipline (my desktop is win-64). I guess there should be a flag following this command line:

conda install -c Quantopian zipline

Any idea?

We just released win-64 conda packages for zipline 0.9.0. So if you've got win-64 conda installed, you should be able to install zipline now!

Enjoy vcvarsall.bat !

Oh My God.....I lost count of how many times I loaded and unloaded Anaconda and god knows what else to try and get zipline working on Windows. Eventually I just gave up, abandoned zipline and move to another Python back tester.

win-64 conda packages for zipline 0.9.0.

Can't face even trying it. I wasted literally weeks of my life trying to get zipline running on Windoze....

Life is just too d**n short.

Sorry it was so difficult Anthony.

All the feedback you and others provided to us about the pain of running zipline on Windows was exactly the reason we are now providing win-64 conda packages and have fixed other issues in zipline dependency installation and in 32-bit compatibility. We spent a lot of time adding Windows to our continuous integration matrix, probably running into many of the same issues you did, so that Windows users will find it easier to install zipline now.

Hopefully if you try again in the future, you'll find it easier too!

Hi Rich Frank,
I was able to install Miniconda 64-bit Python 2.7 + Zipline 0.9.0 on my Windows 64-bit machine but even running you basic script throws another error (the same Unicode problem for any other script).

c:\Program Files\Miniconda2\Scripts>python run_algo.py
[2016-04-25 11:55:37.086000] INFO: Loader: Loading stock: AAPL Traceback (most recent call last):
File "run_algo.py", line 25, in
run_pipeline(**parsed)
File "C:\Program Files\Miniconda2\lib\site-packages\zipline\utils\cli.py", line 229, in run_pipeline
with open(algo_fname, 'r') as fd:
TypeError: coercing to Unicode: need string or buffer, NoneType found

Hi Peter,

It looks like your command is missing the path to the algo file you want to run. Not the best error from zipline, but it's complaining when trying to open an empty filename. Take a look at run_algo.py --help or the docs - I believe you'll want to use --algofile or -f.

-Rich

Hi Rich Frank,
thanks for help, you were right (I must run it as ,,python run_algo.py -f dual_ema_talib.py parameters''). Nevertheless it just opened many other problems:

1) AttributeError: 'BarData' object has no attribute 'current'
2) ImportError: No module named talib

All these scripts were working when I was using it a year ago with Zipline/Quntopian.
Peter

Hard to know the cause without looking at your algo script, but some guesses:

  1. Perhaps you're running an example from HEAD of master of zipline, which is now ahead of the 0.9.0 zipline release. Essentially running a Q2 algo with Q1 zipline. Try updating your installed zipline or using an example from 0.9.0.
  2. Did you conda/pip install talib (or pip install zipline[talib])? talib is actually an optional dependency of zipline.

Hope that helps!

I get everything (zipline and other Quantopian related) working last month after I had finally installed VisualStudio for Python.

Hi Rich Frank,
1) Yeah, that's the case, I am using Zipline 0.9.0 installed using conda install -c Quantopian zipline
2) Yes I did, but I got the following:
C:>conda install talib
Fetching package metadata: ....
Solving package specifications: .
Error: Package missing in current win-64 channels:
- talib

Hi Peter,

The package is named "ta-lib" with a hyphen, so your command should be conda install -c Quantopian ta-lib.

-Rich

Perfect, the first script finished fine now. Thanks.

Great!

Hi Rich,

I am using, conda install -c quantopian zipline=1.0.1, to install zipline on my win-64 machine,
but kept receiving this error message "Error: Package missing in current win-32 channels: - zipline 1.0.0*" .

Is the default Quantopian channel for win32? How can I choose win-64 to install zipline1.0.1 ?

Regards,
Steven

Hi Steven,

We're only publishing win-64 packages of zipline currently. It sounds like, even though you're running on win-64, you've installed a win-32 version of conda (you can confirm with conda info). Either or both can be installed on a win-64 machine, so try the win-64 version: http://conda.pydata.org/miniconda.html.

Best,
Rich

Hi Rich,
My machine is running on win-64 and i´ve installed a win-64 version of conda. I´ve installed the latest version of Zipline (1.0.2) but still receiving the same error message: no module named Zipline.Api
I also uninstalled win-64 conda version and installed the win-32 version and used "conda install -c quantopian zipline=0.7.0" to install zipline package. It still doesnt work. Can you explain me which can be the problem? and which are the ideal requirements for installing Zipline?

This might help someone...I also had some trouble installing Zipline in Windows 64 bit. What worked is Anaconda, win-64, python 3.4 (3.5 has numerous issues), and zipline 1.0.2. I had to downgrade (using conda) from Python 3.5 to 3.4. This will force a downgrade of many packages (numpy, pandas, spyder, ipython, etc). If you have a lot of dependencies, the downgrade might not be worth it.