albumentationsインストール時のエラー
albumentationsをpip installする際に下記のエラーが発生。
error内容
Traceback (most recent call last):
File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
main()
File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/opt/pyenv/versions/3.9.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 248, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/tmp/pip-build-env-awj8sday/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 244, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/tmp/pip-build-env-awj8sday/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 229, in _build_with_temp_dir
self.run_setup()
File "/tmp/pip-build-env-awj8sday/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 281, in run_setup
super(_BuildMetaLegacyBackend,
File "/tmp/pip-build-env-awj8sday/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 462, in <module>
main()
File "setup.py", line 222, in main
skbuild.setup(
File "/tmp/pip-build-env-awj8sday/overlay/lib/python3.9/site-packages/skbuild/setuptools_wrap.py", line 676, in setup
_classify_installed_files(
File "setup.py", line 402, in _classify_installed_files_override
return (cls.wraps._classify_installed_files)(
TypeError: _classify_installed_files() got an unexpected keyword argument 'cmake_install_dir'
Building wheel for opencv-python-headless (PEP 517): finished with status 'error'
ERROR: Failed building wheel for opencv-python-headless
Failed to build opencv-python-headless
ERROR: Failed to build one or more wheels
解決策
pip3 install git+https://github.com/opencv/opencv-python
pip install -U albumentations --no-binary qudida,albumentations
と依存ライブラリであるopencv-pythonをインストールしたのちに、
再度albumentationsをこれらの依存パッケージなしでインストールすると解決。