X-DataInitiative / tick

Module for statistical learning, with a particular emphasis on time-dependent modelling
https://x-datainitiative.github.io/tick/
BSD 3-Clause "New" or "Revised" License
484 stars 105 forks source link

Problem with Colab #422

Closed MojtabaHayati closed 4 years ago

MojtabaHayati commented 4 years ago

Hi, I want to install the “tick” package in colab and I’m having very bad errors. Do you know what is going wrong? Regards, Mojtaba Hayati.

The error: Building wheels for collected packages: tick Building wheel for tick (setup.py) ... error ERROR: Failed building wheel for tick Running setup.py clean for tick Failed to build tick Installing collected packages: tick Running setup.py install for tick ... error ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-g33kshl0/tick/setup.py'"'"'; file='"'"'/tmp/pip-install-g33kshl0/tick/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-ta5ba2ty/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

PhilipDeegan commented 4 years ago

hi there

can you send me the output of the following commands on your system please?

python3 -V
python3 -c "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))"
MojtabaHayati commented 4 years ago

That is: File "", line 2 python3 -c "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))" ^ SyntaxError: invalid syntax

I remind that I am using google colab.

PhilipDeegan commented 4 years ago

we don't have a python3.8 pip release as of yet

what does this output in python for you

import sys
print(sys.version_info[0], sys.version_info[1])
MojtabaHayati commented 4 years ago

The out put is: 3 3

PhilipDeegan commented 4 years ago

python 3.6 is the oldest supported version

MojtabaHayati commented 4 years ago

when I run : import platform;

print(platform.sys.version);

I will get: 3.6.9 (default, Nov 7 2019, 10:44:02) [GCC 8.3.0]

PhilipDeegan commented 4 years ago

we don't have a linux wheel for pip released as I was having issues with deployment. I'll see about resolving this shortly. will update you

Mbompr commented 4 years ago

In the meantime maybe can you deal with an older version ? pip install tick==0.5.0.0 might work for example.

MojtabaHayati commented 4 years ago

Thanks. It got installed but the new problem is that I cannot import the hawkes package.

The error:

ImportError Traceback (most recent call last)

in () 5 import scipy 6 import matplotlib.pyplot as plt ----> 7 from tick.hawkes import HawkesConditionalLaw 6 frames /usr/local/lib/python3.6/dist-packages/tick/preprocessing/longitudinal_features_product.py in () 5 from itertools import combinations 6 from copy import deepcopy ----> 7 from scipy.misc import comb 8 from sklearn.externals.joblib import Parallel, delayed 9 from tick.preprocessing.base import LongitudinalPreprocessor ImportError: cannot import name 'comb'
PhilipDeegan commented 4 years ago

see https://github.com/X-DataInitiative/tick/issues/365

MojtabaHayati commented 4 years ago

Thanks. How can I do the mentioned replacement?

PhilipDeegan commented 4 years ago

try this

!curl https://raw.githubusercontent.com/X-DataInitiative/tick/master/tick/preprocessing/longitudinal_features_product.py -o /usr/local/lib/python3.6/dist-packages/tick/preprocessing/longitudinal_features_product.py
MojtabaHayati commented 4 years ago

It works. Thank you so much for your help.

PhilipDeegan commented 4 years ago

a new pip package has been deployed for linux

the following should now work without issue

!pip install tick
from tick.hawkes import HawkesConditionalLaw