zivid / zivid-python

Official Python package for Zivid 3D cameras
BSD 3-Clause "New" or "Revised" License
40 stars 14 forks source link

Failed to build zivid #212

Closed Lokesh-26 closed 1 year ago

Lokesh-26 commented 1 year ago

I tried to install zivid using pip and from source but could not build it. System configuration Ubuntu 20.04 pip version = 23.1.1. also tried with previous version python = 3.8. I also installed all the necessary dependencies too. Also tried few fixes from previous issues (installed the packages separately which are listed in pyproject.toml).

Defaulting to user installation because normal site-packages is not writeable Processing /home/iiwa/loki_zivid/zivid-python Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: numpy in /home/iiwa/.local/lib/python3.8/site-packages (from zivid==2.8.0.2.9.0) (1.21.2) Building wheels for collected packages: zivid Building wheel for zivid (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for zivid (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [89 lines of output] cmake version 3.26.3

  CMake suite maintained and supported by Kitware (kitware.com/cmake).
  CMake Warning (dev) at CMakeLists.txt:1 (project):
    cmake_minimum_required() should be called prior to this top-level project()
    call.  Please see the cmake-commands(7) manual for usage documentation of
    both commands.
  This warning is for project developers.  Use -Wno-dev to suppress it.

  -- The CXX compiler identification is GNU 9.4.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done (0.3s)
  -- Generating done (0.0s)
  -- Build files have been written to: /tmp/zivid-python-build-9hxp5bj9
  [1/2] Building CXX object CMakeFiles/lib.dir/lib.cpp.o
  [2/2] Linking CXX static library liblib.a

  --------------------------------------------------------------------------------
  -- Trying 'Ninja' generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  Not searching for unused variables given on the command line.
  -- The C compiler identification is GNU 9.4.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- The CXX compiler identification is GNU 9.4.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done (0.3s)
  -- Generating done (0.0s)
  -- Build files have been written to: /home/iiwa/loki_zivid/zivid-python/_cmake_test_compile/build
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying 'Ninja' generator - success
  --------------------------------------------------------------------------------

  Configuring Project
    Working directory:
      /home/iiwa/loki_zivid/zivid-python/_skbuild/linux-x86_64-3.8/cmake-build
    Command:
      /tmp/pip-build-env-d7v6vddj/overlay/lib/python3.8/site-packages/cmake/data/bin/cmake /home/iiwa/loki_zivid/zivid-python -G Ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/home/iiwa/loki_zivid/zivid-python/_skbuild/linux-x86_64-3.8/cmake-install -DPYTHON_VERSION_STRING:STRING=3.8.10 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-d7v6vddj/overlay/lib/python3.8/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/usr/bin/python -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPYTHON_LIBRARY:PATH=/usr/lib/x86_64-linux-gnu/libpython3.8.so -DPython_EXECUTABLE:PATH=/usr/bin/python -DPython_ROOT_DIR:PATH=/usr -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPython3_EXECUTABLE:PATH=/usr/bin/python -DPython3_ROOT_DIR:PATH=/usr -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/usr/include/python3.8 -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-d7v6vddj/overlay/lib/python3.8/site-packages/ninja/data/bin/ninja -DZIVID_PYTHON_VERSION=2.8.0.2.9.0 -DZIVID_SDK_VERSION=2.9.0 -DPYTHON_INTERPRETER_VERSION=3.8.10 -DCMAKE_BUILD_TYPE:STRING=Release

  Not searching for unused variables given on the command line.
  -- Conan: checking conan executable
  -- Conan: Found program /tmp/pip-build-env-nufv5bkc/overlay/bin/conan
  CMake Error at _skbuild/linux-x86_64-3.8/cmake-build/conan.cmake:929 (message):
    Conan --version failed='No such file or directory'
  Call Stack (most recent call first):
    _skbuild/linux-x86_64-3.8/cmake-build/conan.cmake:549 (conan_check)
    CMakeLists.txt:24 (conan_cmake_install)

  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "/tmp/pip-build-env-d7v6vddj/overlay/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 666, in setup
      env = cmkr.configure(
    File "/tmp/pip-build-env-d7v6vddj/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 356, in configure
      raise SKBuildError(msg)

  An error occurred while configuring with CMake.
    Command:
      /tmp/pip-build-env-d7v6vddj/overlay/lib/python3.8/site-packages/cmake/data/bin/cmake /home/iiwa/loki_zivid/zivid-python -G Ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/home/iiwa/loki_zivid/zivid-python/_skbuild/linux-x86_64-3.8/cmake-install -DPYTHON_VERSION_STRING:STRING=3.8.10 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-d7v6vddj/overlay/lib/python3.8/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/usr/bin/python -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPYTHON_LIBRARY:PATH=/usr/lib/x86_64-linux-gnu/libpython3.8.so -DPython_EXECUTABLE:PATH=/usr/bin/python -DPython_ROOT_DIR:PATH=/usr -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPython3_EXECUTABLE:PATH=/usr/bin/python -DPython3_ROOT_DIR:PATH=/usr -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/usr/include/python3.8 -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-d7v6vddj/overlay/lib/python3.8/site-packages/ninja/data/bin/ninja -DZIVID_PYTHON_VERSION=2.8.0.2.9.0 -DZIVID_SDK_VERSION=2.9.0 -DPYTHON_INTERPRETER_VERSION=3.8.10 -DCMAKE_BUILD_TYPE:STRING=Release
    Source directory:
      /home/iiwa/loki_zivid/zivid-python
    Working directory:
      /home/iiwa/loki_zivid/zivid-python/_skbuild/linux-x86_64-3.8/cmake-build
  Please see CMake's output for more information.

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for zivid Failed to build zivid ERROR: Could not build wheels for zivid, which is required to install pyproject.toml-based projects

eskaur commented 1 year ago

When building from source: Can you try deleting any temporary build directories that may have been created by a previous build?(For example: Delete the _skbuild directory)

Lokesh-26 commented 1 year ago

I deleted the _skbuild directory and tried to build. Still facing the same issue. I have Zivid 2.9 installed in my system. Should I consider downgrading it? I am using Zivid Two camera.

Lokesh-26 commented 1 year ago

@eskaur , are there any solution methods I could further follow to solve this error?

eskaur commented 1 year ago

It should not be necessary to downgrade the SDK version. Let's try to get it working with 2.9.

Can you:

Lokesh-26 commented 1 year ago

@eskaur, I created a python conda environment called zivid and then activated it. then I executed the following commands.

  1. git clone https://github.com/zivid/zivid-python.git
  2. cd zivid-python
  3. pip install . After executing the 3rd command I get the following error message,

(zivid) iiwa@iiwa-pc:~/loki_zivid/zivid-python$ pip install . Defaulting to user installation because normal site-packages is not writeable Processing /home/iiwa/loki_zivid/zivid-python Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: numpy in /home/iiwa/.local/lib/python3.8/site-packages (from zivid==2.8.0.2.9.0) (1.21.2) Building wheels for collected packages: zivid Building wheel for zivid (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for zivid (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [99 lines of output] cmake version 3.26.3

  CMake suite maintained and supported by Kitware (kitware.com/cmake).
  CMake Warning (dev) at CMakeLists.txt:1 (project):
    cmake_minimum_required() should be called prior to this top-level project()
    call.  Please see the cmake-commands(7) manual for usage documentation of
    both commands.
  This warning is for project developers.  Use -Wno-dev to suppress it.

  -- The CXX compiler identification is GNU 9.4.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done (0.3s)
  -- Generating done (0.0s)
  -- Build files have been written to: /tmp/zivid-python-build-75uzmyh9
  [1/2] Building CXX object CMakeFiles/lib.dir/lib.cpp.o
  [2/2] Linking CXX static library liblib.a

  --------------------------------------------------------------------------------
  -- Trying 'Ninja' generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  Not searching for unused variables given on the command line.
  -- The C compiler identification is GNU 9.4.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- The CXX compiler identification is GNU 9.4.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done (0.3s)
  -- Generating done (0.0s)
  -- Build files have been written to: /home/iiwa/loki_zivid/zivid-python/_cmake_test_compile/build
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying 'Ninja' generator - success
  --------------------------------------------------------------------------------

  Configuring Project
    Working directory:
      /home/iiwa/loki_zivid/zivid-python/_skbuild/linux-x86_64-3.8/cmake-build
    Command:
      /tmp/pip-build-env-vlkq_fji/overlay/lib/python3.8/site-packages/cmake/data/bin/cmake /home/iiwa/loki_zivid/zivid-python -G Ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/home/iiwa/loki_zivid/zivid-python/_skbuild/linux-x86_64-3.8/cmake-install -DPYTHON_VERSION_STRING:STRING=3.8.10 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-vlkq_fji/overlay/lib/python3.8/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/usr/bin/python -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPYTHON_LIBRARY:PATH=/usr/lib/x86_64-linux-gnu/libpython3.8.so -DPython_EXECUTABLE:PATH=/usr/bin/python -DPython_ROOT_DIR:PATH=/usr -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPython3_EXECUTABLE:PATH=/usr/bin/python -DPython3_ROOT_DIR:PATH=/usr -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/usr/include/python3.8 -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-vlkq_fji/overlay/lib/python3.8/site-packages/ninja/data/bin/ninja -DZIVID_PYTHON_VERSION=2.8.0.2.9.0 -DZIVID_SDK_VERSION=2.9.0 -DPYTHON_INTERPRETER_VERSION=3.8.10 -DCMAKE_BUILD_TYPE:STRING=Release

  Not searching for unused variables given on the command line.
  -- The CXX compiler identification is GNU 9.4.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Downloading conan.cmake from https://github.com/conan-io/cmake-conan
  -- Found Python3: /usr/bin/python (found suitable exact version "3.8.10") found components: Interpreter Development Development.Module Development.Embed
  -- Conan: checking conan executable
  -- Conan: Found program /tmp/pip-build-env-vlkq_fji/overlay/bin/conan
  -- Conan: Version found Conan version 1.59.0
  -- Conan executing: /tmp/pip-build-env-vlkq_fji/overlay/bin/conan install . --remote conancenter --install-folder /home/iiwa/loki_zivid/zivid-python/_skbuild/linux-x86_64-3.8/cmake-build/conan_install --settings build_type=Release --settings compiler=gcc --settings compiler.version=9 --settings compiler.libcxx=libstdc++11
  ERROR: No remote 'conancenter' defined in remotes
  CMake Error at _skbuild/linux-x86_64-3.8/cmake-build/conan.cmake:651 (message):
    Conan install failed='1'
  Call Stack (most recent call first):
    CMakeLists.txt:24 (conan_cmake_install)

  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "/tmp/pip-build-env-vlkq_fji/overlay/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 666, in setup
      env = cmkr.configure(
    File "/tmp/pip-build-env-vlkq_fji/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 356, in configure
      raise SKBuildError(msg)

  An error occurred while configuring with CMake.
    Command:
      /tmp/pip-build-env-vlkq_fji/overlay/lib/python3.8/site-packages/cmake/data/bin/cmake /home/iiwa/loki_zivid/zivid-python -G Ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/home/iiwa/loki_zivid/zivid-python/_skbuild/linux-x86_64-3.8/cmake-install -DPYTHON_VERSION_STRING:STRING=3.8.10 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-vlkq_fji/overlay/lib/python3.8/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/usr/bin/python -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPYTHON_LIBRARY:PATH=/usr/lib/x86_64-linux-gnu/libpython3.8.so -DPython_EXECUTABLE:PATH=/usr/bin/python -DPython_ROOT_DIR:PATH=/usr -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPython3_EXECUTABLE:PATH=/usr/bin/python -DPython3_ROOT_DIR:PATH=/usr -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/usr/include/python3.8 -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-vlkq_fji/overlay/lib/python3.8/site-packages/ninja/data/bin/ninja -DZIVID_PYTHON_VERSION=2.8.0.2.9.0 -DZIVID_SDK_VERSION=2.9.0 -DPYTHON_INTERPRETER_VERSION=3.8.10 -DCMAKE_BUILD_TYPE:STRING=Release
    Source directory:
      /home/iiwa/loki_zivid/zivid-python
    Working directory:
      /home/iiwa/loki_zivid/zivid-python/_skbuild/linux-x86_64-3.8/cmake-build
  Please see CMake's output for more information.

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for zivid Failed to build zivid ERROR: Could not build wheels for zivid, which is required to install pyproject.toml-based projects

eskaur commented 1 year ago

Thanks! Interesting. We know that zivid-python generally works with Ubuntu20.04 + Python3.8 because this is automatically tested in the CI system. The only difference with what you are doing seems to be the Conda environment, since we use a "normal" virtual env.

Can you try with a "normal" venv, and also manually installing build dependencies:

python3.8 -m venv ./myvenv source ./myvenv/bin/activate pip install cmake ninja scikit-build conan==1.59.0 git clone https://github.com/zivid/zivid-python.git cd zivid-python pip install .

Lokesh-26 commented 1 year ago

I executed the commands you suggested. But at the end after pip install . I am getting the exact same error. Is there any pip version that I need to have in order to install zivid-python or is it some other issue? Thanks for your suggestion:)

eskaur commented 1 year ago

The Ubuntu 20.04 workflow in the CI works, so I investigated exactly its state:

> pip --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

> pip list
Package    Version    
---------- -----------
numpy      1.24.3     
pip        20.0.2     
setuptools 45.2.0     
wheel      0.34.2     
zivid      2.8.0.2.9.0

Can you try to match this and see if it helps?

Lokesh-26 commented 1 year ago

@eskaur , I matched the versions you sent and now I am getting the following error after executing pip install .

Defaulting to user installation because normal site-packages is not writeable
Processing /home/iiwa/segmentation/zivid-python
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: numpy in /home/iiwa/.local/lib/python3.8/site-packages (from zivid==2.8.0.2.9.0) (1.24.3)
Building wheels for collected packages: zivid
  Building wheel for zivid (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python /home/iiwa/.local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmppdm46l76
       cwd: /tmp/pip-req-build-ho0ecwc1
  Complete output (99 lines):
  cmake version 3.26.3

  CMake suite maintained and supported by Kitware (kitware.com/cmake).
  CMake Warning (dev) at CMakeLists.txt:1 (project):
    cmake_minimum_required() should be called prior to this top-level project()
    call.  Please see the cmake-commands(7) manual for usage documentation of
    both commands.
  This warning is for project developers.  Use -Wno-dev to suppress it.

  -- The CXX compiler identification is GNU 9.4.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done (0.3s)
  -- Generating done (0.0s)
  -- Build files have been written to: /tmp/zivid-python-build-q1f9yl6z
  [1/2] Building CXX object CMakeFiles/lib.dir/lib.cpp.o
  [2/2] Linking CXX static library liblib.a

  --------------------------------------------------------------------------------
  -- Trying 'Ninja' generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  Not searching for unused variables given on the command line.
  -- The C compiler identification is GNU 9.4.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- The CXX compiler identification is GNU 9.4.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done (0.3s)
  -- Generating done (0.0s)
  -- Build files have been written to: /tmp/pip-req-build-ho0ecwc1/_cmake_test_compile/build
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying 'Ninja' generator - success
  --------------------------------------------------------------------------------

  Configuring Project
    Working directory:
      /tmp/pip-req-build-ho0ecwc1/_skbuild/linux-x86_64-3.8/cmake-build
    Command:
      /tmp/pip-build-env-ma8ba9qi/overlay/lib/python3.8/site-packages/cmake/data/bin/cmake /tmp/pip-req-build-ho0ecwc1 -G Ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-req-build-ho0ecwc1/_skbuild/linux-x86_64-3.8/cmake-install -DPYTHON_VERSION_STRING:STRING=3.8.10 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-ma8ba9qi/overlay/lib/python3.8/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/usr/bin/python -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPYTHON_LIBRARY:PATH=/usr/lib/x86_64-linux-gnu/libpython3.8.so -DPython_EXECUTABLE:PATH=/usr/bin/python -DPython_ROOT_DIR:PATH=/usr -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPython3_EXECUTABLE:PATH=/usr/bin/python -DPython3_ROOT_DIR:PATH=/usr -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/usr/include/python3.8 -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-ma8ba9qi/overlay/lib/python3.8/site-packages/ninja/data/bin/ninja -DZIVID_PYTHON_VERSION=2.8.0.2.9.0 -DZIVID_SDK_VERSION=2.9.0 -DPYTHON_INTERPRETER_VERSION=3.8.10 -DCMAKE_BUILD_TYPE:STRING=Release

  Not searching for unused variables given on the command line.
  -- The CXX compiler identification is GNU 9.4.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Downloading conan.cmake from https://github.com/conan-io/cmake-conan
  -- Found Python3: /usr/bin/python (found suitable exact version "3.8.10") found components: Interpreter Development Development.Module Development.Embed
  -- Conan: checking conan executable
  -- Conan: Found program /tmp/pip-build-env-ma8ba9qi/overlay/bin/conan
  -- Conan: Version found Conan version 1.59.0
  -- Conan executing: /tmp/pip-build-env-ma8ba9qi/overlay/bin/conan install . --remote conancenter --install-folder /tmp/pip-req-build-ho0ecwc1/_skbuild/linux-x86_64-3.8/cmake-build/conan_install --settings build_type=Release --settings compiler=gcc --settings compiler.version=9 --settings compiler.libcxx=libstdc++11
  ERROR: No remote 'conancenter' defined in remotes
  CMake Error at _skbuild/linux-x86_64-3.8/cmake-build/conan.cmake:651 (message):
    Conan install failed='1'
  Call Stack (most recent call first):
    CMakeLists.txt:24 (conan_cmake_install)

  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "/tmp/pip-build-env-ma8ba9qi/overlay/lib/python3.8/site-packages/skbuild/setuptools_wrap.py", line 666, in setup
      env = cmkr.configure(
    File "/tmp/pip-build-env-ma8ba9qi/overlay/lib/python3.8/site-packages/skbuild/cmaker.py", line 356, in configure
      raise SKBuildError(msg)

  An error occurred while configuring with CMake.
    Command:
      /tmp/pip-build-env-ma8ba9qi/overlay/lib/python3.8/site-packages/cmake/data/bin/cmake /tmp/pip-req-build-ho0ecwc1 -G Ninja --no-warn-unused-cli -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-req-build-ho0ecwc1/_skbuild/linux-x86_64-3.8/cmake-install -DPYTHON_VERSION_STRING:STRING=3.8.10 -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PATH:PATH=/tmp/pip-build-env-ma8ba9qi/overlay/lib/python3.8/site-packages/skbuild/resources/cmake -DPYTHON_EXECUTABLE:PATH=/usr/bin/python -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPYTHON_LIBRARY:PATH=/usr/lib/x86_64-linux-gnu/libpython3.8.so -DPython_EXECUTABLE:PATH=/usr/bin/python -DPython_ROOT_DIR:PATH=/usr -DPython_FIND_REGISTRY:STRING=NEVER -DPython_INCLUDE_DIR:PATH=/usr/include/python3.8 -DPython3_EXECUTABLE:PATH=/usr/bin/python -DPython3_ROOT_DIR:PATH=/usr -DPython3_FIND_REGISTRY:STRING=NEVER -DPython3_INCLUDE_DIR:PATH=/usr/include/python3.8 -DCMAKE_MAKE_PROGRAM:FILEPATH=/tmp/pip-build-env-ma8ba9qi/overlay/lib/python3.8/site-packages/ninja/data/bin/ninja -DZIVID_PYTHON_VERSION=2.8.0.2.9.0 -DZIVID_SDK_VERSION=2.9.0 -DPYTHON_INTERPRETER_VERSION=3.8.10 -DCMAKE_BUILD_TYPE:STRING=Release
    Source directory:
      /tmp/pip-req-build-ho0ecwc1
    Working directory:
      /tmp/pip-req-build-ho0ecwc1/_skbuild/linux-x86_64-3.8/cmake-build
  Please see CMake's output for more information.

  ----------------------------------------
  ERROR: Failed building wheel for zivid
Failed to build zivid
ERROR: Could not build wheels for zivid which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 20.0.2; however, version 23.1.2 is available.
You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.
eskaur commented 1 year ago

First, clean _skbuild directory and try again. If that doesn't work:

The error

ERROR: No remote 'conancenter' defined in remotes

looks interesting.

When I do conan remote list i get

conancenter: https://center.conan.io [Verify SSL: True]

Do you? If not, try to re-add the official conancenter remote (should be a quick google on how to do that).

Lokesh-26 commented 1 year ago

I get the following when I do conan remote list

conancenter: https://center.conan.io [Verify SSL: True, Enabled: True]

I still the get same error and when I did pip install . ,_skbuild directory did not create inside zivid-python.

eskaur commented 1 year ago

Alright, not sure where to go from here to fix your build environment for zivid-python.

Fallback option for you: I built this binary distribution for you in a Ubuntu 20.04 docker container. Can you try:

  1. Remove ".txt" suffix from file (github didnt like the ".whl" suffix)
  2. Run pip on that file (pip install zivid-2.8.0.2.9.0-cp38-cp38-linux_x86_64.whl)

zivid-2.8.0.2.9.0-cp38-cp38-linux_x86_64.whl.txt

Lokesh-26 commented 1 year ago

Thank you for your help :) finally it built successfully.