fehlfarbe / python-aruco

Python wrappers for ArUco library
Other
67 stars 16 forks source link

pip install fails #29

Closed spifftek70 closed 3 years ago

spifftek70 commented 5 years ago

Can't get the pip install to work.


Collecting aruco
  Using cached https://files.pythonhosted.org/packages/ca/32/07ec0148fade2615e144b834aca177d201564197795e1639ce1850a766b6/aruco-3.0.4.1.tar.gz
Requirement already satisfied: numpy in /usr/local/lib/python3.7/site-packages (from aruco) (1.15.0)
Building wheels for collected packages: aruco
  Building wheel for aruco (setup.py) ... error
  Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-66x7rmjq/aruco/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 /private/tmp/pip-wheel-bs8zjq57 --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.14-x86_64-3.7
  copying aruco.py -> build/lib.macosx-10.14-x86_64-3.7
  running build_ext
  building '_aruco' extension
  creating build/temp.macosx-10.14-x86_64-3.7
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include/opencv2 -I/usr/include/eigen3/ -Isrc/include/ -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c aruco_wrap.cxx -o build/temp.macosx-10.14-x86_64-3.7/aruco_wrap.o -std=c++11 -Wall -fopenmp -Wunused-variable
  clang: error: unsupported option '-fopenmp'
  error: command 'clang' failed with exit status 1

  ----------------------------------------
  Failed building wheel for aruco
  Running setup.py clean for aruco
Failed to build aruco
Installing collected packages: aruco
  Running setup.py install for aruco ... error
    Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-66x7rmjq/aruco/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-hu9jy8_x/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.14-x86_64-3.7
    copying aruco.py -> build/lib.macosx-10.14-x86_64-3.7
    running build_ext
    building '_aruco' extension
    creating build/temp.macosx-10.14-x86_64-3.7
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include/opencv2 -I/usr/include/eigen3/ -Isrc/include/ -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c aruco_wrap.cxx -o build/temp.macosx-10.14-x86_64-3.7/aruco_wrap.o -std=c++11 -Wall -fopenmp -Wunused-variable
    clang: error: unsupported option '-fopenmp'
    error: command 'clang' failed with exit status 1

    ----------------------------------------
Command "/usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-install-66x7rmjq/aruco/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-hu9jy8_x/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-install-66x7rmjq/aruco/```
fehlfarbe commented 5 years ago

Are you on OS X? I uploaded a new version to PyPi (3.0.4.2) that disables "-fopenmp" for OS X. Please retry the installation via pip.

spifftek70 commented 5 years ago

Yes, I'm MacOS 10.14.3. I've attempted to install via pip install aruco and sudo -H pip install aruco, but I get the same error either way.

fehlfarbe commented 5 years ago

Unfortunately I don't have a Mac to test the installation script. What does python -c "import platform; print(platform.system())" return on your system?

spifftek70 commented 5 years ago

Responds with Darwin

On Feb 17, 2019, at 2:53 PM, fehlfarbe notifications@github.com wrote:

Unfortunately I don't have a Mac to test the installation script. What does python -c "import platform; print(platform.system())" return on your system?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fehlfarbe/python-aruco/issues/29#issuecomment-464507649, or mute the thread https://github.com/notifications/unsubscribe-auth/ALLxVqLRkHnf7wqe_D6y2jO5G0SjdU2Dks5vOcFlgaJpZM4a94De.

fehlfarbe commented 5 years ago

Hm that's weird because I dont't add the "-fopenmp" switch if the detected system is darwin. Can you please retry? I uploaded a new version with current aruco 3.0.13. If that doesn't work I can look for a way to create a precompiled wheel package for Mac...

beenjamminnallday commented 3 years ago

I have the same error on Debian OS. Was this ever solved?

fehlfarbe commented 3 years ago

Is it really the same error? Can you please post the console output? Debian should support openmp on default.

XORring-Samurai commented 3 years ago

Hi, i am facing the same issue with Ubuntu 20.04. Can you help me out?

Collecting aruco==3.1.12
  Using cached aruco-3.1.12.0.tar.gz (169 kB)
Requirement already satisfied: numpy in ./.local/lib/python3.8/site-packages (from aruco==3.1.12) (1.19.5)
Building wheels for collected packages: aruco
  Building wheel for aruco (setup.py) ... 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-vis86911/aruco/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vis86911/aruco/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-1foqrc50
       cwd: /tmp/pip-install-vis86911/aruco/
  Complete output (86 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/aruco
  copying aruco/__init__.py -> build/lib.linux-x86_64-3.8/aruco
  copying aruco/pyaruco.py -> build/lib.linux-x86_64-3.8/aruco
  running egg_info
  writing aruco.egg-info/PKG-INFO
  writing dependency_links to aruco.egg-info/dependency_links.txt
  writing requirements to aruco.egg-info/requires.txt
  writing top-level names to aruco.egg-info/top_level.txt
  reading manifest file 'aruco.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'aruco.egg-info/SOURCES.txt'
  copying aruco/LICENSE -> build/lib.linux-x86_64-3.8/aruco
  copying aruco/README.md -> build/lib.linux-x86_64-3.8/aruco
  copying aruco/arucoPYTHON_wrap.cxx -> build/lib.linux-x86_64-3.8/aruco
  copying aruco/arucoPYTHON_wrap.h -> build/lib.linux-x86_64-3.8/aruco
  creating build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/aruco.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/aruco_cvversioning.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/aruco_export.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/cameraparameters.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/cvdrawingutils.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/debug.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/dictionary.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/dictionary_based.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/fractaldetector.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/ippe.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/levmarq.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/marker.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/markerdetector.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/markerdetector_impl.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/markerlabeler.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/markermap.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/picoflann.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/posetracker.h -> build/lib.linux-x86_64-3.8/aruco/include
  copying aruco/include/timers.h -> build/lib.linux-x86_64-3.8/aruco/include
  creating build/lib.linux-x86_64-3.8/aruco/include/dcf
  copying aruco/include/dcf/dcf_utils.h -> build/lib.linux-x86_64-3.8/aruco/include/dcf
  copying aruco/include/dcf/dcfmarkermaptracker.h -> build/lib.linux-x86_64-3.8/aruco/include/dcf
  copying aruco/include/dcf/dcfmarkertracker.h -> build/lib.linux-x86_64-3.8/aruco/include/dcf
  copying aruco/include/dcf/trackerimpl.h -> build/lib.linux-x86_64-3.8/aruco/include/dcf
  creating build/lib.linux-x86_64-3.8/aruco/include/fractallabelers
  copying aruco/include/fractallabelers/fractallabeler.h -> build/lib.linux-x86_64-3.8/aruco/include/fractallabelers
  copying aruco/include/fractallabelers/fractalmarker.h -> build/lib.linux-x86_64-3.8/aruco/include/fractallabelers
  copying aruco/include/fractallabelers/fractalmarkerset.h -> build/lib.linux-x86_64-3.8/aruco/include/fractallabelers
  copying aruco/include/fractallabelers/fractalposetracker.h -> build/lib.linux-x86_64-3.8/aruco/include/fractallabelers
  running build_ext
  building '_pyaruco' extension
  creating build/temp.linux-x86_64-3.8
  creating build/temp.linux-x86_64-3.8/aruco
  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 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include -I/usr/local/include/ -I/usr/local/include/opencv4/ -I/usr/include/eigen3/ -Iaruco/include -I/usr/include/python3.8 -c aruco/arucoPYTHON_wrap.cxx -o build/temp.linux-x86_64-3.8/aruco/arucoPYTHON_wrap.o -std=c++11 -Wall -O3 -g0 -DNDEBUG -fopenmp
  In file included from /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from aruco/arucoPYTHON_wrap.cxx:4170:
  /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:779: warning: "NPY_ARRAY_C_CONTIGUOUS" redefined
    779 | #define NPY_ARRAY_C_CONTIGUOUS    0x0001
        |
  aruco/arucoPYTHON_wrap.cxx:4161: note: this is the location of the previous definition
   4161 |  #define NPY_ARRAY_C_CONTIGUOUS NPY_C_CONTIGUOUS
        |
  In file included from /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                   from /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from aruco/arucoPYTHON_wrap.cxx:4170:
  /home/eshaan/.local/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 /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:21,
                   from /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from aruco/arucoPYTHON_wrap.cxx:4170:
  /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/__multiarray_api.h:1396: warning: "PyArray_SetBaseObject" redefined
   1396 | #define PyArray_SetBaseObject \
        |
  aruco/arucoPYTHON_wrap.cxx:4162: note: this is the location of the previous definition
   4162 |  #define PyArray_SetBaseObject(arr, x) (PyArray_BASE(arr) = (x))
        |
  In file included from aruco/arucoPYTHON_wrap.cxx:4174:
  aruco/include/aruco_cvversioning.h:3:10: fatal error: opencv2/core/core.hpp: No such file or directory
      3 | #include <opencv2/core/core.hpp>
        |          ^~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for aruco
  Running setup.py clean for aruco
Failed to build aruco
Installing collected packages: aruco
    Running setup.py install for aruco ... 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-vis86911/aruco/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vis86911/aruco/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-627iw8c9/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/eshaan/.local/include/python3.8/aruco
         cwd: /tmp/pip-install-vis86911/aruco/
    Complete output (86 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/aruco
    copying aruco/__init__.py -> build/lib.linux-x86_64-3.8/aruco
    copying aruco/pyaruco.py -> build/lib.linux-x86_64-3.8/aruco
    running egg_info
    writing aruco.egg-info/PKG-INFO
    writing dependency_links to aruco.egg-info/dependency_links.txt
    writing requirements to aruco.egg-info/requires.txt
    writing top-level names to aruco.egg-info/top_level.txt
    reading manifest file 'aruco.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'aruco.egg-info/SOURCES.txt'
    copying aruco/LICENSE -> build/lib.linux-x86_64-3.8/aruco
    copying aruco/README.md -> build/lib.linux-x86_64-3.8/aruco
    copying aruco/arucoPYTHON_wrap.cxx -> build/lib.linux-x86_64-3.8/aruco
    copying aruco/arucoPYTHON_wrap.h -> build/lib.linux-x86_64-3.8/aruco
    creating build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/aruco.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/aruco_cvversioning.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/aruco_export.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/cameraparameters.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/cvdrawingutils.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/debug.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/dictionary.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/dictionary_based.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/fractaldetector.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/ippe.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/levmarq.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/marker.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/markerdetector.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/markerdetector_impl.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/markerlabeler.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/markermap.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/picoflann.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/posetracker.h -> build/lib.linux-x86_64-3.8/aruco/include
    copying aruco/include/timers.h -> build/lib.linux-x86_64-3.8/aruco/include
    creating build/lib.linux-x86_64-3.8/aruco/include/dcf
    copying aruco/include/dcf/dcf_utils.h -> build/lib.linux-x86_64-3.8/aruco/include/dcf
    copying aruco/include/dcf/dcfmarkermaptracker.h -> build/lib.linux-x86_64-3.8/aruco/include/dcf
    copying aruco/include/dcf/dcfmarkertracker.h -> build/lib.linux-x86_64-3.8/aruco/include/dcf
    copying aruco/include/dcf/trackerimpl.h -> build/lib.linux-x86_64-3.8/aruco/include/dcf
    creating build/lib.linux-x86_64-3.8/aruco/include/fractallabelers
    copying aruco/include/fractallabelers/fractallabeler.h -> build/lib.linux-x86_64-3.8/aruco/include/fractallabelers
    copying aruco/include/fractallabelers/fractalmarker.h -> build/lib.linux-x86_64-3.8/aruco/include/fractallabelers
    copying aruco/include/fractallabelers/fractalmarkerset.h -> build/lib.linux-x86_64-3.8/aruco/include/fractallabelers
    copying aruco/include/fractallabelers/fractalposetracker.h -> build/lib.linux-x86_64-3.8/aruco/include/fractallabelers
    running build_ext
    building '_pyaruco' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/aruco
    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 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include -I/usr/local/include/ -I/usr/local/include/opencv4/ -I/usr/include/eigen3/ -Iaruco/include -I/usr/include/python3.8 -c aruco/arucoPYTHON_wrap.cxx -o build/temp.linux-x86_64-3.8/aruco/arucoPYTHON_wrap.o -std=c++11 -Wall -O3 -g0 -DNDEBUG -fopenmp
    In file included from /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                     from /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from aruco/arucoPYTHON_wrap.cxx:4170:
    /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:779: warning: "NPY_ARRAY_C_CONTIGUOUS" redefined
      779 | #define NPY_ARRAY_C_CONTIGUOUS    0x0001
          |
    aruco/arucoPYTHON_wrap.cxx:4161: note: this is the location of the previous definition
     4161 |  #define NPY_ARRAY_C_CONTIGUOUS NPY_C_CONTIGUOUS
          |
    In file included from /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822,
                     from /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                     from /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from aruco/arucoPYTHON_wrap.cxx:4170:
    /home/eshaan/.local/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 /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:21,
                     from /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from aruco/arucoPYTHON_wrap.cxx:4170:
    /home/eshaan/.local/lib/python3.8/site-packages/numpy/core/include/numpy/__multiarray_api.h:1396: warning: "PyArray_SetBaseObject" redefined
     1396 | #define PyArray_SetBaseObject \
          |
    aruco/arucoPYTHON_wrap.cxx:4162: note: this is the location of the previous definition
     4162 |  #define PyArray_SetBaseObject(arr, x) (PyArray_BASE(arr) = (x))
          |
    In file included from aruco/arucoPYTHON_wrap.cxx:4174:
    aruco/include/aruco_cvversioning.h:3:10: fatal error: opencv2/core/core.hpp: No such file or directory
        3 | #include <opencv2/core/core.hpp>
          |          ^~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vis86911/aruco/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vis86911/aruco/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-627iw8c9/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/eshaan/.local/include/python3.8/aruco Check the logs for full command output.
ArthurMargerit commented 3 years ago

I build it !!! he is alive !!! The library is not build properly due to "/usr/local/include" -> "/usr/include".

aruco_module = Extension('_pyaruco',
                         sources=sourcefiles,
                         language="c++",
                         extra_compile_args=extra_cpp_args,
                         include_dirs=[np.get_include(),
                                       "/usr/local/include/",
                                       "/usr/local/include/opencv4/",
                                       "/usr/include/eigen3/",
                                       "@PROJECT_NAME@/include"],
                         libraries=["aruco", "opencv_core", "opencv_imgproc", "opencv_calib3d", "opencv_highgui", "opencv_ml"],
                         library_dirs=["/usr/local/lib"]) 

change to :

aruco_module = Extension('_pyaruco',
                         sources=sourcefiles,
                         language="c++",
                         extra_compile_args=extra_cpp_args,
                         include_dirs=[np.get_include(),
                                       "/usr/include/",
                                       "/usr/include/opencv4/",
                                       "/usr/include/eigen3/",
                                       "@PROJECT_NAME@/include"],
                         libraries=["aruco", "opencv_core", "opencv_imgproc", "opencv_calib3d", "opencv_highgui", "opencv_ml"],
                         library_dirs=["/usr/lib"])
O2KAN commented 2 years ago

I build it !!! he is alive !!! The library is not build properly due to "/usr/local/include" -> "/usr/include".

aruco_module = Extension('_pyaruco',
                         sources=sourcefiles,
                         language="c++",
                         extra_compile_args=extra_cpp_args,
                         include_dirs=[np.get_include(),
                                       "/usr/local/include/",
                                       "/usr/local/include/opencv4/",
                                       "/usr/include/eigen3/",
                                       "@PROJECT_NAME@/include"],
                         libraries=["aruco", "opencv_core", "opencv_imgproc", "opencv_calib3d", "opencv_highgui", "opencv_ml"],
                         library_dirs=["/usr/local/lib"]) 

change to :

aruco_module = Extension('_pyaruco',
                         sources=sourcefiles,
                         language="c++",
                         extra_compile_args=extra_cpp_args,
                         include_dirs=[np.get_include(),
                                       "/usr/include/",
                                       "/usr/include/opencv4/",
                                       "/usr/include/eigen3/",
                                       "@PROJECT_NAME@/include"],
                         libraries=["aruco", "opencv_core", "opencv_imgproc", "opencv_calib3d", "opencv_highgui", "opencv_ml"],
                         library_dirs=["/usr/lib"])

Hi, how can I do that? I could not understand what you mean.