Skip to content
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.

pandas problem (at first run), python-tk missing (2nd run) #22

Closed
drandreaskrueger opened this issue Aug 8, 2017 · 3 comments
Closed

Comments

@drandreaskrueger
Copy link

problem: pandas (1st run), python-tk (2nd run)

  • What did you expect to happen?
    that the tutorial runs fine

    catalyst run -f buy_and_hodl.py --start 2015-3-1 --end 2017-6-28 --capital-base 100000 -o bah.pickle

  • What happened instead?
    it stops with this error:

  File ".../enigmampc/catalyst/catalyst-venv/local/lib/python2.7/site-packages/catalyst/data/loader.py", line 367, in ensure_crypto_benchmark_data
    if not has_data_for_dates(daily_close, first_date, last_date):
  File ".../enigmampc/catalyst/catalyst-venv/local/lib/python2.7/site-packages/catalyst/data/loader.py", line 97, in has_data_for_dates
    return (first <= first_date) and (last >= last_date)
  File "pandas/tslib.pyx", line 1106, in pandas.tslib._Timestamp.__richcmp__ (pandas/tslib.c:20503)
  File "pandas/tslib.pyx", line 1167, in pandas.tslib._Timestamp._assert_tzawareness_compat (pandas/tslib.c:21519)

then when I re-run it, with this error

  File ".../enigmampc/catalyst/catalyst-venv/local/lib/python2.7/site-packages/six.py", line 82, in _import_module
    __import__(name)
  File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 42, in <module>
    raise ImportError, str(msg) + ', please install the python-tk package'
ImportError: No module named _tkinter, please install the python-tk package

which I could fix with

sudo apt install python-tk

... and then ... it worked, and showed the diagrams.

What I had done before:

mkdir enigmampc
cd enigmampc
git clone https://github.com/enigmampc/catalyst.git
cd catalyst

virtualenv catalyst-venv
source ./catalyst-venv/bin/activate

pip install enigma-catalyst matplotlib

catalyst ingest
cd catalyst/examples/
catalyst run -f buy_and_hodl.py --start 2015-3-1 --end 2017-6-28 --capital-base 100000 -o bah.pickle

my system looks like this

uname --all
Linux ... 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 GNU/Linux

python --version
Python 2.7.13

python -c 'import math, sys;print(int(math.log(sys.maxsize + 1, 2) + 1))'
64

installed via virtualenv and pip

pip freeze
alembic==0.9.4
bcolz==0.12.1
Bottleneck==1.2.1
certifi==2017.7.27.1
chardet==3.0.4
click==6.7
contextlib2==0.5.5
cycler==0.10.0
cyordereddict==1.0.0
Cython==0.26
decorator==4.1.2
empyrical==0.2.1
enigma-catalyst==0.1.dev6
functools32==3.2.3.post2
idna==2.5
intervaltree==2.1.0
Logbook==1.1.0
lru-dict==1.1.6
Mako==1.0.7
MarkupSafe==1.0
matplotlib==2.0.2
multipledispatch==0.4.9
networkx==1.11
numexpr==2.6.2
numpy==1.13.1
pandas==0.19.2
pandas-datareader==0.5.0
patsy==0.4.1
pyparsing==2.2.0
python-dateutil==2.6.1
python-editor==1.0.3
pytz==2017.2
requests==2.18.3
requests-file==1.4.2
requests-ftp==0.3.1
scipy==0.19.1
six==1.10.0
sortedcontainers==1.5.7
SQLAlchemy==1.1.13
statsmodels==0.8.0
subprocess32==3.2.7
tables==3.4.2
toolz==0.8.2
urllib3==1.22

hope that helps?

@lacabra
Copy link
Contributor

lacabra commented Aug 9, 2017

Yes, this is very helpful, thanks for reporting. I will take a closer look. Glad that you figured it out!

@lacabra
Copy link
Contributor

lacabra commented Aug 25, 2017

@drandreaskrueger thanks for reporting this. The first part of this issue is a duplicate of #18, which was addressed in commit 13d405b, which in turn is part of 0.1.dev7 release: 20a98a3 in the master branch. A newer version has been released since then, and we are on 0.1.dev8. New installs don't cause this issue.

The second issue has been documented in our wiki in the Troubleshooting section of Getting Started with running an algo.

Thank you.

@lacabra lacabra closed this as completed Aug 25, 2017
@drandreaskrueger
Copy link
Author

Thanks a lot!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants