StatMixedML/LightGBMLSS

Can't install on Ubuntu 20.04

p-schaefer opened this issue · 2 comments

I'm trying to install this package on a fresh virtual environment on an Ubuntu 20.04 server, but get the following error:

Building wheels for collected packages: lightgbmlss
  Building wheel for lightgbmlss (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/pschaefer/environments/my_env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-9665r5_t/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-9665r5_t/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-zv9atfsj
       cwd: /tmp/pip-req-build-9665r5_t/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for lightgbmlss
  Running setup.py clean for lightgbmlss
Failed to build lightgbmlss
ERROR: numba 0.56.4 has requirement numpy<1.24,>=1.18, but you'll have numpy 1.24.1 which is incompatible.
Full log below:

Collecting git+https://github.com/StatMixedML/LightGBMLSS.git
  Cloning https://github.com/StatMixedML/LightGBMLSS.git to /tmp/pip-req-build-9665r5_t
  Running command git clone -q https://github.com/StatMixedML/LightGBMLSS.git /tmp/pip-req-build-9665r5_t
Collecting ipywidgets
  Using cached ipywidgets-8.0.4-py3-none-any.whl (137 kB)
Collecting lightgbm~=3.3.1
  Using cached lightgbm-3.3.4-py3-none-manylinux1_x86_64.whl (2.0 MB)
Collecting matplotlib
  Using cached matplotlib-3.6.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (9.4 MB)
Collecting numpy~=1.16
  Using cached numpy-1.24.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
Collecting optuna~=2.9.1
  Using cached optuna-2.9.1-py3-none-any.whl (302 kB)
Collecting pandas~=1.1
  Using cached pandas-1.5.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
Collecting plotnine~=0.8.0
  Using cached plotnine-0.8.0-py3-none-any.whl (4.7 MB)
Collecting properscoring~=0.1
  Using cached properscoring-0.1-py2.py3-none-any.whl (23 kB)
Collecting scikit-learn>=0.24.2
  Using cached scikit_learn-1.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.7 MB)
Collecting scipy
  Using cached scipy-1.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.5 MB)
Processing /home/pschaefer/.cache/pip/wheels/3d/c9/06/734ed80d6d61fad331974bf62017b4ea6b33488082b9f5e67e/shap-0.39.0-cp38-cp38-linux_x86_64.whl
Collecting torch~=1.13.0
  Using cached torch-1.13.1-cp38-cp38-manylinux1_x86_64.whl (887.4 MB)
Collecting tqdm
  Using cached tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
Collecting ipykernel>=4.5.1
  Using cached ipykernel-6.20.1-py3-none-any.whl (149 kB)
Collecting jupyterlab-widgets~=3.0
  Using cached jupyterlab_widgets-3.0.5-py3-none-any.whl (384 kB)
Collecting traitlets>=4.3.1
  Using cached traitlets-5.8.1-py3-none-any.whl (116 kB)
Collecting ipython>=6.1.0
  Using cached ipython-8.8.0-py3-none-any.whl (775 kB)
Collecting widgetsnbextension~=4.0
  Using cached widgetsnbextension-4.0.5-py3-none-any.whl (2.0 MB)
Collecting wheel
  Downloading wheel-0.38.4-py3-none-any.whl (36 kB)
Collecting pillow>=6.2.0
  Using cached Pillow-9.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB)
Collecting kiwisolver>=1.0.1
  Using cached kiwisolver-1.4.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.2 MB)
Collecting fonttools>=4.22.0
  Using cached fonttools-4.38.0-py3-none-any.whl (965 kB)
Collecting pyparsing>=2.2.1
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting python-dateutil>=2.7
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting cycler>=0.10
  Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting packaging>=20.0
  Using cached packaging-23.0-py3-none-any.whl (42 kB)
Collecting contourpy>=1.0.1
  Using cached contourpy-1.0.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (295 kB)
Collecting alembic
  Using cached alembic-1.9.1-py3-none-any.whl (210 kB)
Collecting sqlalchemy>=1.1.0
  Using cached SQLAlchemy-1.4.46-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB)
Collecting PyYAML
  Using cached PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (701 kB)
Collecting colorlog
  Using cached colorlog-6.7.0-py2.py3-none-any.whl (11 kB)
Collecting cmaes>=0.8.2
  Using cached cmaes-0.9.1-py3-none-any.whl (21 kB)
Collecting cliff
  Using cached cliff-4.1.0-py3-none-any.whl (81 kB)
Collecting pytz>=2020.1
  Using cached pytz-2022.7-py2.py3-none-any.whl (499 kB)
Collecting mizani>=0.7.3
  Using cached mizani-0.8.1-py3-none-any.whl (64 kB)
Collecting patsy>=0.5.1
  Using cached patsy-0.5.3-py2.py3-none-any.whl (233 kB)
Collecting descartes>=1.1.0
  Using cached descartes-1.1.0-py3-none-any.whl (5.8 kB)
Collecting statsmodels>=0.12.1
  Using cached statsmodels-0.13.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.9 MB)
Collecting joblib>=1.1.1
  Using cached joblib-1.2.0-py3-none-any.whl (297 kB)
Collecting threadpoolctl>=2.0.0
  Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting slicer==0.0.7
  Using cached slicer-0.0.7-py3-none-any.whl (14 kB)
Collecting numba
  Using cached numba-0.56.4-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.5 MB)
Collecting cloudpickle
  Using cached cloudpickle-2.2.0-py3-none-any.whl (25 kB)
Collecting typing-extensions
  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting nvidia-cudnn-cu11==8.5.0.96; platform_system == "Linux"
  Using cached nvidia_cudnn_cu11-8.5.0.96-2-py3-none-manylinux1_x86_64.whl (557.1 MB)
Collecting nvidia-cublas-cu11==11.10.3.66; platform_system == "Linux"
  Using cached nvidia_cublas_cu11-11.10.3.66-py3-none-manylinux1_x86_64.whl (317.1 MB)
Collecting nvidia-cuda-nvrtc-cu11==11.7.99; platform_system == "Linux"
  Using cached nvidia_cuda_nvrtc_cu11-11.7.99-2-py3-none-manylinux1_x86_64.whl (21.0 MB)
Collecting nvidia-cuda-runtime-cu11==11.7.99; platform_system == "Linux"
  Using cached nvidia_cuda_runtime_cu11-11.7.99-py3-none-manylinux1_x86_64.whl (849 kB)
Collecting debugpy>=1.0
  Using cached debugpy-1.6.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
Collecting psutil
  Using cached psutil-5.9.4-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (280 kB)
Collecting comm>=0.1.1
  Using cached comm-0.1.2-py3-none-any.whl (6.5 kB)
Collecting matplotlib-inline>=0.1
  Using cached matplotlib_inline-0.1.6-py3-none-any.whl (9.4 kB)
Collecting tornado>=6.1
  Using cached tornado-6.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (423 kB)
Collecting jupyter-client>=6.1.12
  Using cached jupyter_client-7.4.8-py3-none-any.whl (133 kB)
Collecting nest-asyncio
  Using cached nest_asyncio-1.5.6-py3-none-any.whl (5.2 kB)
Collecting pyzmq>=17
  Using cached pyzmq-25.0.0-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)
Collecting prompt-toolkit<3.1.0,>=3.0.11
  Using cached prompt_toolkit-3.0.36-py3-none-any.whl (386 kB)
Collecting stack-data
  Using cached stack_data-0.6.2-py3-none-any.whl (24 kB)
Collecting pexpect>4.3; sys_platform != "win32"
  Using cached pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
Collecting backcall
  Using cached backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting pygments>=2.4.0
  Using cached Pygments-2.14.0-py3-none-any.whl (1.1 MB)
Collecting jedi>=0.16
  Using cached jedi-0.18.2-py2.py3-none-any.whl (1.6 MB)
Collecting decorator
  Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting pickleshare
  Using cached pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting Mako
  Using cached Mako-1.2.4-py3-none-any.whl (78 kB)
Collecting importlib-resources; python_version < "3.9"
  Using cached importlib_resources-5.10.2-py3-none-any.whl (34 kB)
Collecting importlib-metadata; python_version < "3.9"
  Using cached importlib_metadata-6.0.0-py3-none-any.whl (21 kB)
Collecting greenlet!=0.4.17; python_version >= "3" and (platform_machine == "aarch64" or (platform_machine == "ppc64le" or (platform_machine == "x86_64" or (platform_machine == "amd64" or (platform_machine == "AMD64" or (platform_machine == "win32" or platform_machine == "WIN32"))))))
  Using cached greenlet-2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (544 kB)
Collecting PrettyTable>=0.7.2
  Using cached prettytable-3.6.0-py3-none-any.whl (27 kB)
Collecting stevedore>=2.0.1
  Using cached stevedore-4.1.1-py3-none-any.whl (50 kB)
Collecting cmd2>=1.0.0
  Using cached cmd2-2.4.2-py3-none-any.whl (147 kB)
Collecting autopage>=0.4.0
  Using cached autopage-0.5.1-py3-none-any.whl (29 kB)
Collecting backports.zoneinfo; python_version < "3.9"
  Using cached backports.zoneinfo-0.2.1-cp38-cp38-manylinux1_x86_64.whl (74 kB)
Collecting palettable
  Using cached palettable-3.3.0-py2.py3-none-any.whl (111 kB)
Collecting llvmlite<0.40,>=0.39.0dev0
  Using cached llvmlite-0.39.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.6 MB)
Requirement already satisfied: setuptools in ./my_env/lib/python3.8/site-packages (from numba->shap~=0.39.0->lightgbmlss==0.1.0) (44.0.0)
Collecting entrypoints
  Using cached entrypoints-0.4-py3-none-any.whl (5.3 kB)
Collecting jupyter-core>=4.9.2
  Using cached jupyter_core-5.1.3-py3-none-any.whl (93 kB)
Collecting wcwidth
  Using cached wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Collecting executing>=1.2.0
  Using cached executing-1.2.0-py2.py3-none-any.whl (24 kB)
Collecting pure-eval
  Using cached pure_eval-0.2.2-py3-none-any.whl (11 kB)
Collecting asttokens>=2.1.0
  Using cached asttokens-2.2.1-py2.py3-none-any.whl (26 kB)
Collecting ptyprocess>=0.5
  Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting parso<0.9.0,>=0.8.0
  Using cached parso-0.8.3-py2.py3-none-any.whl (100 kB)
Collecting MarkupSafe>=0.9.2
  Using cached MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting zipp>=3.1.0; python_version < "3.10"
  Using cached zipp-3.11.0-py3-none-any.whl (6.6 kB)
Collecting pbr!=2.1.0,>=2.0.0
  Using cached pbr-5.11.1-py2.py3-none-any.whl (112 kB)
Processing /home/pschaefer/.cache/pip/wheels/7f/1a/65/84ff8c386bec21fca6d220ea1f5498a0367883a78dd5ba6122/pyperclip-1.8.2-py3-none-any.whl
Collecting attrs>=16.3.0
  Using cached attrs-22.2.0-py3-none-any.whl (60 kB)
Collecting platformdirs>=2.5
  Using cached platformdirs-2.6.2-py3-none-any.whl (14 kB)
Building wheels for collected packages: lightgbmlss
  Building wheel for lightgbmlss (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/pschaefer/environments/my_env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-9665r5_t/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-9665r5_t/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-zv9atfsj
       cwd: /tmp/pip-req-build-9665r5_t/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for lightgbmlss
  Running setup.py clean for lightgbmlss
Failed to build lightgbmlss
ERROR: numba 0.56.4 has requirement numpy<1.24,>=1.18, but you'll have numpy 1.24.1 which is incompatible.
Installing collected packages: debugpy, packaging, psutil, traitlets, comm, matplotlib-inline, tornado, entrypoints, platformdirs, jupyter-core, six, python-dateutil, pyzmq, nest-asyncio, jupyter-client, wcwidth, prompt-toolkit, executing, pure-eval, asttokens, stack-data, ptyprocess, pexpect, backcall, pygments, parso, jedi, decorator, pickleshare, ipython, ipykernel, jupyterlab-widgets, widgetsnbextension, ipywidgets, numpy, scipy, wheel, joblib, threadpoolctl, scikit-learn, lightgbm, pillow, kiwisolver, fonttools, pyparsing, cycler, contourpy, matplotlib, MarkupSafe, Mako, greenlet, sqlalchemy, zipp, importlib-resources, importlib-metadata, alembic, PyYAML, colorlog, cmaes, tqdm, PrettyTable, pbr, stevedore, pyperclip, attrs, cmd2, autopage, cliff, optuna, pytz, pandas, backports.zoneinfo, palettable, mizani, patsy, descartes, statsmodels, plotnine, properscoring, slicer, llvmlite, numba, cloudpickle, shap, typing-extensions, nvidia-cublas-cu11, nvidia-cudnn-cu11, nvidia-cuda-nvrtc-cu11, nvidia-cuda-runtime-cu11, torch, lightgbmlss
    Running setup.py install for lightgbmlss ... done
Successfully installed Mako-1.2.4 MarkupSafe-2.1.1 PrettyTable-3.6.0 PyYAML-6.0 alembic-1.9.1 asttokens-2.2.1 attrs-22.2.0 autopage-0.5.1 backcall-0.2.0 backports.zoneinfo-0.2.1 cliff-4.1.0 cloudpickle-2.2.0 cmaes-0.9.1 cmd2-2.4.2 colorlog-6.7.0 comm-0.1.2 contourpy-1.0.6 cycler-0.11.0 debugpy-1.6.5 decorator-5.1.1 descartes-1.1.0 entrypoints-0.4 executing-1.2.0 fonttools-4.38.0 greenlet-2.0.1 importlib-metadata-6.0.0 importlib-resources-5.10.2 ipykernel-6.20.1 ipython-8.8.0 ipywidgets-8.0.4 jedi-0.18.2 joblib-1.2.0 jupyter-client-7.4.8 jupyter-core-5.1.3 jupyterlab-widgets-3.0.5 kiwisolver-1.4.4 lightgbm-3.3.4 lightgbmlss-0.1.0 llvmlite-0.39.1 matplotlib-3.6.3 matplotlib-inline-0.1.6 mizani-0.8.1 nest-asyncio-1.5.6 numba-0.56.4 numpy-1.24.1 nvidia-cublas-cu11-11.10.3.66 nvidia-cuda-nvrtc-cu11-11.7.99 nvidia-cuda-runtime-cu11-11.7.99 nvidia-cudnn-cu11-8.5.0.96 optuna-2.9.1 packaging-23.0 palettable-3.3.0 pandas-1.5.2 parso-0.8.3 patsy-0.5.3 pbr-5.11.1 pexpect-4.8.0 pickleshare-0.7.5 pillow-9.4.0 platformdirs-2.6.2 plotnine-0.8.0 prompt-toolkit-3.0.36 properscoring-0.1 psutil-5.9.4 ptyprocess-0.7.0 pure-eval-0.2.2 pygments-2.14.0 pyparsing-3.0.9 pyperclip-1.8.2 python-dateutil-2.8.2 pytz-2022.7 pyzmq-25.0.0 scikit-learn-1.2.0 scipy-1.10.0 shap-0.39.0 six-1.16.0 slicer-0.0.7 sqlalchemy-1.4.46 stack-data-0.6.2 statsmodels-0.13.5 stevedore-4.1.1 threadpoolctl-3.1.0 torch-1.13.1 tornado-6.2 tqdm-4.64.1 traitlets-5.8.1 typing-extensions-4.4.0 wcwidth-0.2.5 wheel-0.38.4 widgetsnbextension-4.0.5 zipp-3.11.0

Trying to import the package yields:

from lightgbmlss.model import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pschaefer/environments/my_env/lib/python3.8/site-packages/lightgbmlss/model.py", line 8, in <module>
    import shap
  File "/home/pschaefer/environments/my_env/lib/python3.8/site-packages/shap/__init__.py", line 12, in <module>
    from ._explanation import Explanation, Cohorts
  File "/home/pschaefer/environments/my_env/lib/python3.8/site-packages/shap/_explanation.py", line 12, in <module>
    from .utils._general import OpChain
  File "/home/pschaefer/environments/my_env/lib/python3.8/site-packages/shap/utils/__init__.py", line 1, in <module>
    from ._clustering import hclust_ordering, partition_tree, partition_tree_shuffle, delta_minimization_order, hclust
  File "/home/pschaefer/environments/my_env/lib/python3.8/site-packages/shap/utils/_clustering.py", line 4, in <module>
    from numba import jit
  File "/home/pschaefer/environments/my_env/lib/python3.8/site-packages/numba/__init__.py", line 42, in <module>
    from numba.np.ufunc import (vectorize, guvectorize, threading_layer,
  File "/home/pschaefer/environments/my_env/lib/python3.8/site-packages/numba/np/ufunc/__init__.py", line 3, in <module>
    from numba.np.ufunc.decorators import Vectorize, GUVectorize, vectorize, guvectorize
  File "/home/pschaefer/environments/my_env/lib/python3.8/site-packages/numba/np/ufunc/decorators.py", line 3, in <module>
    from numba.np.ufunc import _internal
SystemError: initialization of _internal failed without raising an exception

It looks like installing numpy==1.23 and wheel first resolves this issue.

thanks for raising this. I plan to update the requirements anyway soonish, so the problem shouldn't appear anymore.