Browse Source

Fix Error: type object 'sklearn.tree...' #28

pull/1/head
rozetko 6 years ago
parent
commit
beb129ce6d
  1. 10
      analytics/Compilation.md
  2. 1
      analytics/pyinstaller_hooks/hook-pandas.py
  3. 1
      analytics/pyinstaller_hooks/hook-scipy.py
  4. 3
      analytics/pyinstaller_hooks/hook-sklearn.py

10
analytics/Compilation.md

@ -1,12 +1,12 @@
# Compilation
We use [pyinstaller](https://www.pyinstaller.org/) to compile analytics unit into binary file supported by *nix systems with all the dependencies.
We use [pyinstaller](https://www.pyinstaller.org/) to compile analytics unit into binary file with all the dependencies.
Compiled module is supported by all *nix systems.
```bash
pip install pyinstaller
echo "hiddenimports=['pandas._libs.tslibs.timedeltas', 'scipy._lib.messagestream']" | cat > $PYTHON_SITE_PACKAGES/PyInstaller/hooks/hook-pandas.py
pip3 install pyinstaller
cd $HASTIC_SERVER_PATH/analytics
pyinstaller worker.py
pyinstaller --additional-hooks-dir=pyinstaller_hooks worker.py
```
On Ubuntu 16.04 $PYTHON_SITE_PACKAGES directory located at `~/.local/lib/python3.5/site-packages`

1
analytics/pyinstaller_hooks/hook-pandas.py

@ -0,0 +1 @@
hiddenimports=['pandas._libs.tslibs.timedeltas']

1
analytics/pyinstaller_hooks/hook-scipy.py

@ -0,0 +1 @@
hiddenimports=['scipy._lib.messagestream']

3
analytics/pyinstaller_hooks/hook-sklearn.py

@ -0,0 +1,3 @@
from PyInstaller.utils.hooks import collect_submodules
hiddenimports = collect_submodules('sklearn')
Loading…
Cancel
Save