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
480 stars 105 forks source link

Install Tick 0.7.0.1 on Windows 10/11 with Python 3.9 #509

Open lgoix opened 1 year ago

lgoix commented 1 year ago

Tested with python versions :

Swig:

OS:

Visual Studio Build Tools 2022:

Previously installed:

numpy==1.23.1 | numpy==1.24.1 scipy==1.9.0 matplotlib==3.6.3 pandas==1.4.3 scikit-learn==1.2.0

Steps to reproduce:

  1. Download the zip archive from the current master (https://github.com/X-DataInitiative/tick/commit/75d252dbb620f96f2f1452a3421ada1e743df476): https://github.com/X-DataInitiative/tick/archive/refs/heads/master.zip
  2. Download cereal archive from: https://github.com/USCiLab/cereal/archive/51cbda5f30e56c801c07fe3d3aba5d7fb9e6cca4.zip
  3. Inject in the zip file the missing cereal include files:
    • copy directory cereal-51cbda5f30e56c801c07fe3d3aba5d7fb9e6cca4-1.zip\cereal-51cbda5f30e56c801c07fe3d3aba5d7fb9e6cca4\include\ in tick-master.zip\tick-master\lib\third_party\cereal\
  4. Save the tick-master.zip file and then install it: pip install tick-master.zip

When we test Tick, we have the DLL issue: python -c "import tick;"

File "C:\repos\project\venv\lib\site-packages\tick\array\build\array.py", line 10, in <module>
from . import _array
ImportError: DLL load failed while importing _array: A dynamic link library (DLL) initialization routine failed.

Workaround

Instead of using the latest version on master, we have been able to build Tick following the same procedure using an older commit (May 23, 2020) version: https://github.com/X-DataInitiative/tick/commit/73acead819b9485e8a68c08a23a7f99844f89375

(venv) C:\repos\project>python -V
Python 3.9.0

(venv) C:\repos\project>pip show tick
Name: tick
Version: 0.7.0.1
Summary: Module for statistical learning, with a particular emphasis on time-dependent modelling
Home-page: https://x-datainitiative.github.io/tick/
Author: Emmanuel Bacry, Stephane Gaiffas, Martin Bompaire, Søren V. Poulsen, Maryan Morel, Simon Bussy, Philip Deegan
Author-email: martin.bompaire@polytechnique.edu, philip.deegan@polytechnique.edu
License: UNKNOWN
Location: c:\repos\project\venv\lib\site-packages
Requires: numpy, scipy, sphinx, matplotlib, pandas, scikit-learn, dill, numpydoc
Required-by:

(venv) C:\repos\project>python -c "import tick;"

(venv) C:\repos\project>