The code installs:
cd /PyLimitOrderBook
sudo pip install -r requirements.txt
sudo python setup.py install
Without problems. Right. So the goodies are in
cd /PyLimitOrderBook/bin
In particular, from that subdirectory (/bin/
), I try to run the code on XOM_BATS_2010-06-16.csv
(this is the test data file delivered with the package) :
python3 -m limitbook-tseries.py /PyLimitOrderBook/sample_data/XOM_BATS_2010-06-16.csv /PyLimitOrderBook/sample_data/XOM_BATS_2010-06-162.csv
But it fails at the import:
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 174, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/usr/lib/python3.5/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/PyLimitOrderBook/bin/limitbook-tseries.py", line 9, in <module>
from pylimitbook.researchBook import ResearchBook
ImportError: No module named 'pylimitbook'
Of course that module is in:
/PyLimitOrderBook/pylimitbook
But how to tell him that?
I tried different things:
Go one level up, back to
/PyLimitOrderBook/
and do:
python -m bin/limitbook-tseries.py /PyLimitOrderBook/sample_data/XOM_BATS_2010-06-16.csv /PyLimitOrderBook/sample_data/XOM_BATS_2010-06-162.csv
I get:
/usr/bin/python: Import by filename is not supported.
Grrr. What is the correct way?