When I try to install opencv-python 4.3.0.38 using pip with pip install opencv-python
on python 2.7, I'm getting the following error.
Collecting opencv-python
Using cached opencv-python-4.3.0.38.tar.gz (88.0 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python /Library/Python/2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/ch/hg1k0nj940g6n47qv36jjzs00000gn/T/tmpmJirQh
cwd: /private/var/folders/ch/hg1k0nj940g6n47qv36jjzs00000gn/T/pip-install-rayarg/opencv-python
Complete output (22 lines):
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/Library/Python/2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Library/Python/2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "/private/var/folders/ch/hg1k0nj940g6n47qv36jjzs00000gn/T/pip-build-env-_bx9RN/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 146, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/private/var/folders/ch/hg1k0nj940g6n47qv36jjzs00000gn/T/pip-build-env-_bx9RN/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 127, in _get_build_requires
self.run_setup()
File "/private/var/folders/ch/hg1k0nj940g6n47qv36jjzs00000gn/T/pip-build-env-_bx9RN/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 243, in run_setup
self).run_setup(setup_script=setup_script)
File "/private/var/folders/ch/hg1k0nj940g6n47qv36jjzs00000gn/T/pip-build-env-_bx9RN/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 448, in <module>
main()
File "setup.py", line 99, in main
% {"ext": re.escape(sysconfig.get_config_var("EXT_SUFFIX"))}
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 210, in escape
s = list(pattern)
TypeError: 'NoneType' object is not iterable
----------------------------------------
ERROR: Command errored out with exit status 1: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python /Library/Python/2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/ch/hg1k0nj940g6n47qv36jjzs00000gn/T/tmpmJirQh Check the logs for full command output.
How do I fix this? Am I missing something?