Failed building wheel for opencv-python with error message - No such file or directory: 'scripts/__init__.py'
See original GitHub issueChecklist
- I have searched related issues but cannot get the expected help.
- I have read the FAQ documentation but cannot get the expected help.
while building mmcv from source (by using “MMCV_WITH_OPS=1 FORCE_CUDA=1 pip install -e .”) in RHEL Server 7.6, with python 3.7.3, gcc 7.3.0, pytorch 1.7.1 and cuda 10.2, I am encountering an error “ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects”. Last few lines of the traceback says -
File "setup.py", line 289, in main
cmake_source_dir=cmake_source_dir,
File "/tmp/pip-build-env-_w_vgir1/overlay/lib/python3.7/site-packages/skbuild/setuptools_wrap.py", line 629, in setup
cmake_source_dir, skbuild_kw['cmake_install_dir'])
File "setup.py", line 381, in _classify_installed_files_override
with open('scripts/__init__.py', 'r') as custom_init:
FileNotFoundError: [Errno 2] No such file or directory: 'scripts/__init__.py'
----------------
ERROR: Failed building wheel for opencv-python
I think this is related to a very recent bugfix in opencv Exactly line 381 in setup.py (where the installation is facing the error in the traceback) has a change in the above commit of opencv. Can you please help?
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Could not build wheels for opencv-python which use PEP 517 ...
The docker was successfully created and Tensorflow is running but while installing OpenCV using pip it is showing CMake error. root@5abf405fb92d ...
Read more >Pip build fails: FileNotFoundError: [Errno 2] No such file or ...
Pip build fails: FileNotFoundError: [Errno 2] No such file or directory: ... Failed to build opencv-python ERROR: Could not build wheels for ...
Read more >Error building wheel for opencv-python from source
I am trying to build opencv-python with the following environment: OS: MacOS Monterey 12.5 uname -a: Darwin Darwin Kernel Version 21.6.0 ...
Read more >Could not build wheels for opencv-python, which is required to ...
ERROR: Failed building wheel for opencv-python. Failed to build opencv-python ... cannot open shared object file: No such file or directory.
Read more >Python OpenCV installation error - NXP Community
Solved: I am trying to install OpenCV package for Python on my 8MM NavQ Computer using pip package installer. I am facing the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @zhouzaida . Yes, I was just going to post. Finally I could manage to install mmcv. The issue was with the right LD_LIBRARY_PATH and one more env variable CPATH. CPATH was somehow not set. When I exported the cuda/10.2/include path to CPATH and build from source, it compiled successfully. You can close the issue. Thanks a lot for the pointers.
Hi @dasabir , is there any progress?