QuantRocket

Python 3/2.7 issue with quantrocket-client?


#1

Just started with Quantrocket. Blown away by the A+ level of documentation, not to mention the overall platform design.

Things working fine inside JupyterLab with IB gateway.

Decided to install quantrocket-client with
pip install quantrocket-client
as suggested in the documentation. Running quantrocket locally.

Installed fine, got this error when trying it

$ quantrocket houston ping
Traceback (most recent call last):
File “/usr/local/bin/quantrocket”, line 6, in
from quantrocket.cli.commands import main
File “/usr/local/lib/python2.7/dist-packages/quantrocket/init.py”, line 19, in
from quantrocket.price import get_prices
File “/usr/local/lib/python2.7/dist-packages/quantrocket/price.py”, line 26, in
from quantrocket.realtime import (
File “/usr/local/lib/python2.7/dist-packages/quantrocket/realtime.py”, line 534
print(line, end=’’)
^

It looks to me like the “end=” is a python 3 construct for print, and it was in the 2.7 install of quantrocket-client?

Also: Is there a plan to transition to python 3? should I have done a pip3 install? I’m running Ubuntu 19.04

thanks,
-kevin


#2

You should install under Python 3, so yes, pip3 if that’s how your machine is set up. Python 2 support is nominal but looks to be broken at the moment. We should probably just remove that from the distribution as no one should really by using Python 2 anymore anyway.