Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Failed building wheel opencv-python #396

Open
williamtbarker opened this issue Aug 14, 2023 · 9 comments
Open

ERROR: Failed building wheel opencv-python #396

williamtbarker opened this issue Aug 14, 2023 · 9 comments

Comments

@williamtbarker
Copy link

Traceback (most recent call last):
File "/home/will/anaconda3/envs/spinningup/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in
main()
File "/home/will/anaconda3/envs/spinningup/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/will/anaconda3/envs/spinningup/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 249, in build_wheel
metadata_directory)
File "/tmp/pip-build-env-uvtmhjm3/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 231, in build_wheel
wheel_directory, config_settings)
File "/tmp/pip-build-env-uvtmhjm3/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-uvtmhjm3/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 268, in run_setup
self).run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-uvtmhjm3/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 158, in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 535, in
main()
File "setup.py", line 309, in main
cmake_source_dir=cmake_source_dir,
File "/tmp/pip-build-env-uvtmhjm3/overlay/lib/python3.6/site-packages/skbuild/setuptools_wrap.py", line 683, in setup
cmake_install_dir,
File "setup.py", line 448, in _classify_installed_files_override
raise Exception("Not found: '%s'" % relpath_re)
Exception: Not found: 'python/cv2/py.typed'

ERROR: Failed building wheel for opencv-python
Failed to build opencv-python
ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly

//
Could this be an issue with the conda environment???

@williamtbarker
Copy link
Author

This failed for me on two machines: Ubuntu and MacOS

@Peter7777777
Copy link

I have the same problem

@finxcode
Copy link

install opencv-python directly solved this problem
pip install opencv-python==4.1.2.30

@williamtbarker
Copy link
Author

williamtbarker commented Aug 29, 2023 via email

@finxcode
Copy link

That solves one problem, but it does not fix the tensorflow dependency issue I have. Do you know which version of tensorflow is needed for spinningup?

On Tue, Aug 29, 2023 at 6:46 AM finxcode @.> wrote: install opencv-python directly solved this problem pip install opencv-python==4.1.2.30 — Reply to this email directly, view it on GitHub <#396 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/BA55AOXD6JSMUPFETYSHYN3XXXCAVANCNFSM6AAAAAA3QF5ARU . You are receiving this because you authored the thread.Message ID: @.>

the tensorflow version is in the setup.py. I think it's 1.8.0. I use this default version and managed to compile.

@codingJang
Copy link

install opencv-python directly solved this problem
pip install opencv-python==4.1.2.30

This actually helped. You should also re run the line pip install -e . again, and then proceed.

@UnableMight
Copy link

Same issue, same fix.
After the error I run:
pip install opencv-python==4.1.2.30
pip install -e .
and it fixed itself

@underskies00
Copy link

Same issue, same fix. After the error I run: pip install opencv-python==4.1.2.30 pip install -e . and it fixed itself

The version of opencv-python==4.1.2.30 seems to lead another error on macOS, I tried pip install opencv-python==4.5.3.56 then succeed in running experiments.

@xiebinghua
Copy link

Same issue, same fix. After the error I run: pip install opencv-python==4.1.2.30 pip install -e . and it fixed itself

thanks,it solved my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants