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
490 stars 107 forks source link

Problem In Importing #444

Open 517030910405 opened 4 years ago

517030910405 commented 4 years ago

Here is My Environment ( conda list )

# packages in environment at E:\pc2conda\Anaconda3\envs\PP:
#
# Name                    Version                   Build  Channel
alabaster                 0.7.12                   pypi_0    pypi
babel                     2.8.0                    pypi_0    pypi
blas                      1.0                         mkl    anaconda
ca-certificates           2020.1.1                      0    anaconda
certifi                   2020.4.5.1               py36_0    anaconda
chardet                   3.0.4                    pypi_0    pypi
colorama                  0.4.3                    pypi_0    pypi
cycler                    0.10.0                   pypi_0    pypi
docutils                  0.16                     pypi_0    pypi
icc_rt                    2019.0.0             h0cc432a_1    anaconda
idna                      2.9                      pypi_0    pypi
imagesize                 1.2.0                    pypi_0    pypi
intel-openmp              2020.0                      166    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
jinja2                    2.11.2                   pypi_0    pypi
joblib                    0.14.1                     py_0    anaconda
kiwisolver                1.2.0                    pypi_0    pypi
libblas                   3.8.0                    15_mkl    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
libcblas                  3.8.0                    15_mkl    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
liblapack                 3.8.0                    15_mkl    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
markupsafe                1.1.1                    pypi_0    pypi
matplotlib                3.2.1                    pypi_0    pypi
mkl                       2020.0                      166    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
mkl-service               2.3.0            py36hb782905_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
numpy                     1.18.4           py36h4d86e3b_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
numpydoc                  0.9.2                    pypi_0    pypi
openssl                   1.1.1g               he774522_0    anaconda
packaging                 20.3                     pypi_0    pypi
pandas                    1.0.3                    pypi_0    pypi
pip                       20.1               pyh9f0ad1d_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
pygments                  2.6.1                    pypi_0    pypi
pyparsing                 2.4.7                    pypi_0    pypi
python                    3.6.10          he025d50_1009_cpython    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
python-dateutil           2.8.1                    pypi_0    pypi
python_abi                3.6                     1_cp36m    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
pytz                      2020.1                   pypi_0    pypi
requests                  2.23.0                   pypi_0    pypi
scikit-learn              0.23.0           py36h13569b7_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
scipy                     1.4.1            py36h9439919_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
setuptools                27.2.0                   py36_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
six                       1.14.0                   py36_0    anaconda
snowballstemmer           2.0.0                    pypi_0    pypi
sphinx                    3.0.3                    pypi_0    pypi
sphinxcontrib-applehelp   1.0.2                    pypi_0    pypi
sphinxcontrib-devhelp     1.0.2                    pypi_0    pypi
sphinxcontrib-htmlhelp    1.0.3                    pypi_0    pypi
sphinxcontrib-jsmath      1.0.1                    pypi_0    pypi
sphinxcontrib-qthelp      1.0.3                    pypi_0    pypi
sphinxcontrib-serializinghtml 1.1.4                    pypi_0    pypi
sqlite                    3.30.1               hfa6e2cd_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
threadpoolctl             2.0.0              pyh5ca1d4c_0    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
tick                      0.6.0.0                  pypi_0    pypi
urllib3                   1.25.9                   pypi_0    pypi
vc                        14.1                 h869be7e_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
vs2015_runtime            14.16.27012          h30e32a0_2    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
wheel                     0.34.2                     py_1    https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge

And I found:

Python 3.6.10 (default, Mar  5 2020, 10:17:47) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tick
>>> import tick.hawkes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "E:\pc2conda\Anaconda3\envs\PP\lib\site-packages\tick\hawkes\__init__.py", line 3, in <module>
    from .model import (
  File "E:\pc2conda\Anaconda3\envs\PP\lib\site-packages\tick\hawkes\model\__init__.py", line 4, in <module>
    import tick.base_model.build.base_model
  File "E:\pc2conda\Anaconda3\envs\PP\lib\site-packages\tick\base_model\__init__.py", line 5, in <module>
    from .model_labels_features import ModelLabelsFeatures
  File "E:\pc2conda\Anaconda3\envs\PP\lib\site-packages\tick\base_model\model_labels_features.py", line 6, in <module>
    from tick.preprocessing.utils import safe_array
  File "E:\pc2conda\Anaconda3\envs\PP\lib\site-packages\tick\preprocessing\__init__.py", line 4, in <module>
    from .longitudinal_features_product import LongitudinalFeaturesProduct
  File "E:\pc2conda\Anaconda3\envs\PP\lib\site-packages\tick\preprocessing\longitudinal_features_product.py", line 8, in <module>
    from sklearn.externals.joblib import Parallel, delayed
ModuleNotFoundError: No module named 'sklearn.externals.joblib'

How should I import hawkes? Thanks

PhilipDeegan commented 4 years ago

I think "sklearn.externals.joblib" is deprecated