You are not logged in.

#1 2020-01-25 15:48:35

thund3rpantz
Member
Registered: 2013-12-13
Posts: 32

[Solved]Installation of zipline

I'm trying to install zipline, a tool for testing trading algorithms.

It's stated that installing zipline is a bit more involved than usual for a python package, and I have not been able to prove them wrong.

I have installed all the dependencies i could find:
python-numpy
python-pandas
python-dateutil
python-pytz
python-logbook
python-requests
ta-lib

non python dependencies:
cyton
lapack
ta-lib
gcc
gcc-fortran
pkg-config

after this both pip and gcc fails when trying to install or build this package.

attempted methods, with error: 'gcc' failed with exit status 1

pip install zipline

download python tarbal, unpack and

python setup.py build

one of a thousand error messages is :

zipline/assets/_assets.c:10577:13: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_traceback'; did you mean 'curexc_traceback'?
10577 |     tstate->exc_traceback = local_tb;
      |             ^~~~~~~~~~~~~
      |             curexc_traceback

what am I missing here? have any of you been able to install zipline?

Last edited by thund3rpantz (2020-01-26 18:57:01)

Offline

#2 2020-01-25 18:00:08

teckk
Member
Registered: 2013-02-21
Posts: 589

Re: [Solved]Installation of zipline

what am I missing here?

Don't install python modules on arch with pip. You'll have your python file tree messed up.

Make a PKGBUILD for it. Build a package with makepkg. Install the package with pacman. Search this forum for the number of times that has been said.

Here is a start, looks like it's old. Bring this up to date.
https://aur.archlinux.org/packages/python-zipline/
https://aur.archlinux.org/cgit/aur.git/ … on-zipline

Can you pacman -Syu without errors now?
https://wiki.archlinux.org/index.php/PKGBUILD
https://wiki.archlinux.org/index.php/Makepkg
https://wiki.archlinux.org/index.php/Pacman
https://wiki.archlinux.org/index.php/Arch_Build_System

Edit:
additional depends from https://www.zipline.io/install.html
https://aur.archlinux.org/packages/ta-lib/

Last edited by teckk (2020-01-25 18:15:00)

Offline

#3 2020-01-25 18:14:02

teckk
Member
Registered: 2013-02-21
Posts: 589

Re: [Solved]Installation of zipline

Offline

#4 2020-01-25 18:20:25

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: [Solved]Installation of zipline

zipline seems to have issues with cython/python3.7 https://github.com/quantopian/zipline/issues/2616

Last edited by progandy (2020-01-25 18:29:57)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#5 2020-01-26 16:16:14

thund3rpantz
Member
Registered: 2013-12-13
Posts: 32

Re: [Solved]Installation of zipline

teckk wrote:

what am I missing here?

Don't install python modules on arch with pip. You'll have your python file tree messed up.

progandy wrote:

zipline seems to have issues with cython/python3.7 https://github.com/quantopian/zipline/issues/2616

Thanks for the pointers!

I know it's messy so I only use pip if in a virtual environment. virtualenv also seems like a prerequisite for zipline. Will try using python 3.5.

Last edited by thund3rpantz (2020-01-26 16:17:31)

Offline

#6 2020-01-26 16:27:34

teckk
Member
Registered: 2013-02-21
Posts: 589

Offline

#7 2020-01-26 17:22:11

thund3rpantz
Member
Registered: 2013-12-13
Posts: 32

Re: [Solved]Installation of zipline

Progress. The installation was successful, but thew an  error when not finding numpy. Might need an older version of it:

ImportError: No module named 'numpy'
  ----------------------------------------
  ERROR: Failed building wheel for tables

quick guide for the rest of the internet:
install dependencies:
python-numpy
python-pandas
python-dateutil
python-pytz
python-logbook
python-requests
ta-lib
cyton
lapack
ta-lib
gcc
gcc-fortran
pkg-config

install python3.5
make a virtual environment with python3.5

virtualenv -p /usr/bin/python3.5 zipline-env

install zipline with pip

Offline

Board footer

Powered by FluxBB