I have tried to use eolearn on macOS in the past but I ran into this problem.
I am attempting to install the package 'eolearn' from sentintelhub for a project on my Mac Mini M1.
Python: Python 3.10.6
Error:
(env) alex@Alexs-Mac-mini external-adapter % pip install lightgbm
Collecting lightgbm
Using cached lightgbm-3.3.2.tar.gz (1.5 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: wheel in ./env/lib/python3.10/site-packages (from lightgbm) (0.37.1)
Requirement already satisfied: numpy in ./env/lib/python3.10/site-packages (from lightgbm) (1.23.3)
Requirement already satisfied: scipy in ./env/lib/python3.10/site-packages (from lightgbm) (1.9.1)
Requirement already satisfied: scikit-learn!=0.22.0 in ./env/lib/python3.10/site-packages (from lightgbm) (1.1.2)
Requirement already satisfied: threadpoolctl>=2.0.0 in ./env/lib/python3.10/site-packages (from scikit-learn!=0.22.0->lightgbm) (3.1.0)
Requirement already satisfied: joblib>=1.0.0 in ./env/lib/python3.10/site-packages (from scikit-learn!=0.22.0->lightgbm) (1.2.0)
Building wheels for collected packages: lightgbm
Building wheel for lightgbm (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [80 lines of output]
running bdist_wheel
/Users/alex/iris/external-adapter/env/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib
creating build/lib/lightgbm
copying lightgbm/callback.py -> build/lib/lightgbm
copying lightgbm/compat.py -> build/lib/lightgbm
copying lightgbm/plotting.py -> build/lib/lightgbm
copying lightgbm/__init__.py -> build/lib/lightgbm
copying lightgbm/engine.py -> build/lib/lightgbm
copying lightgbm/dask.py -> build/lib/lightgbm
copying lightgbm/basic.py -> build/lib/lightgbm
copying lightgbm/libpath.py -> build/lib/lightgbm
copying lightgbm/sklearn.py -> build/lib/lightgbm
running egg_info
writing lightgbm.egg-info/PKG-INFO
writing dependency_links to lightgbm.egg-info/dependency_links.txt
writing requirements to lightgbm.egg-info/requires.txt
writing top-level names to lightgbm.egg-info/top_level.txt
reading manifest file 'lightgbm.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'build'
warning: no files found matching '*.so' under directory 'lightgbm'
warning: no files found matching '*.so' under directory 'compile'
warning: no files found matching '*.dll' under directory 'compile/Release'
warning: no files found matching '*.dll' under directory 'compile/windows/x64/DLL'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
warning: no previously-included files found matching 'compile/external_libs/compute/.git'
adding license file 'LICENSE'
writing manifest file 'lightgbm.egg-info/SOURCES.txt'
copying lightgbm/VERSION.txt -> build/lib/lightgbm
installing to build/bdist.macosx-12-arm64/wheel
running install
INFO:LightGBM:Starting to compile the library.
INFO:LightGBM:Starting to compile with CMake.
Traceback (most recent call last):
File "/private/var/folders/s2/v6j9g8sn213cxwld7zqhy__c0000gn/T/pip-install-wdkadg2j/lightgbm_57587b567aea47d381d9404da623e5b5/setup.py", line 95, in silent_call
subprocess.check_call(cmd, stderr=log, stdout=log)
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 364, in check_call
retcode = call(*popenargs, **kwargs)
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 345, in call
with Popen(*popenargs, **kwargs) as p:
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 969, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 1845, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'cmake'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/s2/v6j9g8sn213cxwld7zqhy__c0000gn/T/pip-install-wdkadg2j/lightgbm_57587b567aea47d381d9404da623e5b5/setup.py", line 334, in <module>
setup(name='lightgbm',
File "/Users/alex/iris/external-adapter/env/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/alex/iris/external-adapter/env/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 335, in run
self.run_command('install')
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/s2/v6j9g8sn213cxwld7zqhy__c0000gn/T/pip-install-wdkadg2j/lightgbm_57587b567aea47d381d9404da623e5b5/setup.py", line 248, in run
compile_cpp(use_mingw=self.mingw, use_gpu=self.gpu, use_cuda=self.cuda, use_mpi=self.mpi,
File "/private/var/folders/s2/v6j9g8sn213cxwld7zqhy__c0000gn/T/pip-install-wdkadg2j/lightgbm_57587b567aea47d381d9404da623e5b5/setup.py", line 198, in compile_cpp
silent_call(cmake_cmd, raise_error=True, error_msg='Please install CMake and all required dependencies first')
File "/private/var/folders/s2/v6j9g8sn213cxwld7zqhy__c0000gn/T/pip-install-wdkadg2j/lightgbm_57587b567aea47d381d9404da623e5b5/setup.py", line 99, in silent_call
raise Exception("\n".join((error_msg, LOG_NOTICE)))
Exception: Please install CMake and all required dependencies first
The full version of error log was saved into /Users/alex/LightGBM_compilation.log
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for lightgbm
Running setup.py clean for lightgbm
Failed to build lightgbm
Installing collected packages: lightgbm
Running setup.py install for lightgbm ... error
error: subprocess-exited-with-error
× Running setup.py install for lightgbm did not run successfully.
│ exit code: 1
╰─> [41 lines of output]
running install
/Users/alex/iris/external-adapter/env/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
INFO:LightGBM:Starting to compile the library.
INFO:LightGBM:Starting to compile with CMake.
Traceback (most recent call last):
File "/private/var/folders/s2/v6j9g8sn213cxwld7zqhy__c0000gn/T/pip-install-wdkadg2j/lightgbm_57587b567aea47d381d9404da623e5b5/setup.py", line 95, in silent_call
subprocess.check_call(cmd, stderr=log, stdout=log)
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 364, in check_call
retcode = call(*popenargs, **kwargs)
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 345, in call
with Popen(*popenargs, **kwargs) as p:
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 969, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 1845, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'cmake'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/s2/v6j9g8sn213cxwld7zqhy__c0000gn/T/pip-install-wdkadg2j/lightgbm_57587b567aea47d381d9404da623e5b5/setup.py", line 334, in <module>
setup(name='lightgbm',
File "/Users/alex/iris/external-adapter/env/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/core.py", line 148, in setup
dist.run_commands()
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/s2/v6j9g8sn213cxwld7zqhy__c0000gn/T/pip-install-wdkadg2j/lightgbm_57587b567aea47d381d9404da623e5b5/setup.py", line 248, in run
compile_cpp(use_mingw=self.mingw, use_gpu=self.gpu, use_cuda=self.cuda, use_mpi=self.mpi,
File "/private/var/folders/s2/v6j9g8sn213cxwld7zqhy__c0000gn/T/pip-install-wdkadg2j/lightgbm_57587b567aea47d381d9404da623e5b5/setup.py", line 198, in compile_cpp
silent_call(cmake_cmd, raise_error=True, error_msg='Please install CMake and all required dependencies first')
File "/private/var/folders/s2/v6j9g8sn213cxwld7zqhy__c0000gn/T/pip-install-wdkadg2j/lightgbm_57587b567aea47d381d9404da623e5b5/setup.py", line 99, in silent_call
raise Exception("\n".join((error_msg, LOG_NOTICE)))
Exception: Please install CMake and all required dependencies first
The full version of error log was saved into /Users/alex/LightGBM_compilation.log
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> lightgbm
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
I have attempted to solve this problem by:
Installing
wheelseperately as recommended here: https://pypi.org/project/lightgbm/Install
libompusingbrew: https://pypi.org/project/lightgbm/. But I apparently already have it installed.Reinstall
libompusingbrewas recommended by brew. No effect.