utiasASRL/safe_and_smooth

Error when trying to build using Docker

Closed this issue · 3 comments

Hi! I tried to build the Docker image, but I've encountered the following error:

Building wheels for collected packages: scikit-umfpack, scikit-sparse
  Building wheel for scikit-umfpack (setup.py): started
  Building wheel for scikit-umfpack (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-reg6p20m/scikit-umfpack/setup.py'"'"'; __file__='"'"'/tmp/pip-install-reg6p20m/scikit-umfpack/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-4h813smk
       cwd: /tmp/pip-install-reg6p20m/scikit-umfpack/
  Complete output (9 lines):
  /tmp/pip-install-reg6p20m/scikit-umfpack/setup.py:56: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-reg6p20m/scikit-umfpack/setup.py", line 250, in <module>
      setup_package()
    File "/tmp/pip-install-reg6p20m/scikit-umfpack/setup.py", line 243, in setup_package
      from numpy.distutils.core import setup
  ModuleNotFoundError: No module named 'numpy'
  ----------------------------------------
  ERROR: Failed building wheel for scikit-umfpack
  Running setup.py clean for scikit-umfpack
  Building wheel for scikit-sparse (PEP 517): started
  Building wheel for scikit-sparse (PEP 517): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /tmp/tmpx4fg7pns build_wheel /tmp/tmpfp208usv
       cwd: /tmp/pip-install-reg6p20m/scikit-sparse
  Complete output (35 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-38
  creating build/lib.linux-x86_64-cpython-38/sksparse
  copying sksparse/__init__.py -> build/lib.linux-x86_64-cpython-38/sksparse
  copying sksparse/test_cholmod.py -> build/lib.linux-x86_64-cpython-38/sksparse
  creating build/lib.linux-x86_64-cpython-38/sksparse/test_data
  copying sksparse/test_data/illc1850_rhs1.mtx.gz -> build/lib.linux-x86_64-cpython-38/sksparse/test_data
  copying sksparse/test_data/well1033_rhs1.mtx.gz -> build/lib.linux-x86_64-cpython-38/sksparse/test_data
  copying sksparse/test_data/illc1850.mtx.gz -> build/lib.linux-x86_64-cpython-38/sksparse/test_data
  copying sksparse/test_data/illc1033.mtx.gz -> build/lib.linux-x86_64-cpython-38/sksparse/test_data
  copying sksparse/test_data/well1850.mtx.gz -> build/lib.linux-x86_64-cpython-38/sksparse/test_data
  copying sksparse/test_data/illc1033_rhs1.mtx.gz -> build/lib.linux-x86_64-cpython-38/sksparse/test_data
  copying sksparse/test_data/well1033.mtx.gz -> build/lib.linux-x86_64-cpython-38/sksparse/test_data
  copying sksparse/test_data/well1850_rhs1.mtx.gz -> build/lib.linux-x86_64-cpython-38/sksparse/test_data
  running build_ext
  building 'sksparse.cholmod' extension
  creating build/temp.linux-x86_64-cpython-38
  creating build/temp.linux-x86_64-cpython-38/sksparse
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -Isksparse -I/tmp/pip-build-env-0o2_z6gh/overlay/lib/python3.8/site-packages/numpy/core/include -I/usr/include -I/usr/include/suitesparse -I/usr/include/python3.8 -c sksparse/cholmod.c -o build/temp.linux-x86_64-cpython-38/sksparse/cholmod.o
  In file included from /tmp/pip-build-env-0o2_z6gh/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,
                   from /tmp/pip-build-env-0o2_z6gh/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /tmp/pip-build-env-0o2_z6gh/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from sksparse/cholmod.c:1210:
  /tmp/pip-build-env-0o2_z6gh/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     17 | #warning "Using deprecated NumPy API, disable it with " \
        |  ^~~~~~~
  In file included from sksparse/cholmod.c:1215:
  sksparse/cholmod_backward_compatible.h:1:10: fatal error: cholmod.h: No such file or directory
      1 | #include "cholmod.h"
        |          ^~~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for scikit-sparse
Failed to build scikit-umfpack scikit-sparse
ERROR: Could not build wheels for scikit-sparse which use PEP 517 and cannot be installed directly
The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1

Hi, there is indeed a problem with the dokcer install. I recommend using a local install (with your preferred virtualenv manager) until I fix this (seems like there are compatibility issues with scipy-umfpack). Please let me know if you run into problems with the local install.

@jcremona the docker install is now fixed. Please pull the latest changes, and then follow the install instructions in the README file. Feel free to report if anything is still not working.

Thanks!