Build with pip3: No such file or directory: '_skbuild/linux-x86_64-3.9/cmake-install/python/cv2/__init__.py'
@asenyaev ci sta già lavorando.
Dal 7/6/2022.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Hi,
Expected behaviour
I am trying to build a small software using Flatpak. One of the dependencies is opencv-headless (I chose blindly the latest version 4.5.5.64, maybe a previous version would be a better choice) and needs to be built with pip (22.0.4, Python 3.9) during the Flatpak build process.
Actual behaviour
Unfortunately, while other dependencies build successfully, OpenCV build fails with the following error:
Configuring Project
Working directory:
/tmp/pip-install-lo__bgyw/opencv-python-headless_aabd86c2a569434cb5951bb7f10731d3/_skbuild/linux-x86_64-3.9/cmake-build
Command:
cmake /tmp/pip-install-lo__bgyw/opencv-python-headless_aabd86c2a569434cb5951bb7f10731d3/opencv -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/tmp/pip-install-lo__bgyw/ope
ncv-python-headless_aabd86c2a569434cb5951bb7f10731d3/_skbuild/linux-x86_64-3.9/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 -DPYTHON_VERSION_STRING:STRI
NG=3.9.9 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.9 -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.9.so -DSKBUILD:INTERNAL=TRUE -DCMAKE_MODULE_PA
TH:PATH=/app/lib/python3.9/site-packages/skbuild/resources/cmake -DPYTHON3_EXECUTABLE=/usr/bin/python3 -DPYTHON3_INCLUDE_DIR=/usr/include/python3.9 -DPYTHON3_LIBRARY=/
usr/lib/x86_64-linux-gnu/libpython3.9.so -DBUILD_opencv_python3=ON -DBUILD_opencv_python2=OFF -DBUILD_opencv_java=OFF -DOPENCV_PYTHON3_INSTALL_PATH=python -DINSTALL_CR
EATE_DISTRIB=ON -DBUILD_opencv_apps=OFF -DBUILD_opencv_freetype=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_DOCS=OFF -DPYTHON3_LIMITED
_API=ON -DBUILD_OPENEXR=ON -DBUILD_PNG=ON -DWITH_WIN32UI=OFF -DWITH_QT=OFF -DWITH_GTK=OFF -DCMAKE_BUILD_TYPE:STRING=Release
Copying files from CMake output
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 230, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir
self.run_setup()
File "/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 267, in run_setup
super(_BuildMetaLegacyBackend,
File "/usr/lib/python3.9/site-packages/setuptools/build_meta.py", line 158, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 503, in <module>
main()
File "setup.py", line 240, in main
skbuild.setup(
File "/app/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 676, in setup _classify_installed_files( File "setup.py", line 373, in _classify_installed_files_override with open(os.path.join(cmake_install_dir, "python", "cv2", "__init__.py"), 'r') as opencv_init:
FileNotFoundError: [Errno 2] No such file or directory: '_skbuild/linux-x86_64-3.9/cmake-install/python/cv2/__init__.py'
error: subprocess-exited-with-error
× Building wheel for opencv-python-headless (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /usr/bin/python3 /usr/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpbnt_xnkn
cwd: /tmp/pip-install-lo__bgyw/opencv-python-headless_aabd86c2a569434cb5951bb7f10731d3
Building wheel for opencv-python-headless (pyproject.toml) ... error
ERROR: Failed building wheel for opencv-python-headless
It looks very much like #600, but in my case pip seems new enough and I suppose I can't change install location (as suggested in https://github.com/opencv/opencv-python/issues/600#issuecomment-1003108190).
Maybe I am missing something obvious. Any suggestion is welcome (maybe try building with an older version, but which one?).
Regards,
Yvan
- Lingua principale
- Python
- Stelle
- 5.4k
- Fork
- 1k
- Merge medio
- 22h 17m
- PR unite (30g)
- 3
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di opencv/opencv-python
-
[DOC] README file Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
opencv/opencv-python#1217 · 3 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
opencv/opencv-python#1165 · 2 commenti · 1 reazione ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
opencv/opencv-python#1273 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
opencv/opencv-python#1272 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
opencv/opencv-python#1268 · 1 commento ·
Tutte le issue di opencv/opencv-python
Issue simili
-
essnmx good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
-
[Feature] 奇物选择添加优先级 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Giskard-AI/giskard-oss#2840 · 1 commento ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Apertaarea: repo bug perceived difficulty: 2
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
yeti-platform/yeti#1380 ·