I couldn't install loop_tool_py in Apple Silicon
pip3 install loop_tool_py
Collecting loop_tool_py
Using cached loop_tool_py-0.0.5.tar.gz (44 kB)
Preparing metadata (setup.py) ... done
Collecting pybind11
Using cached pybind11-2.8.0-py2.py3-none-any.whl (207 kB)
Building wheels for collected packages: loop-tool-py
Building wheel for loop-tool-py (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /Users/reshinthadithyan/miniforge3/envs/compiler_gym/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/setup.py'"'"'; __file__='"'"'/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-wheel-tf10xzyn
cwd: /private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/
Complete output (45 lines):
running bdist_wheel
running build
running build_ext
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/build/temp.macosx-11.0-arm64-3.9/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/setup.py", line 105, in <module>
setup(
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/setup.py", line 95, in build_extension
subprocess.check_call(
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/build/lib.macosx-11.0-arm64-3.9/', '-DPYTHON_EXECUTABLE=/Users/reshinthadithyan/miniforge3/envs/compiler_gym/bin/python3.9', '-DCMAKE_BUILD_TYPE=Release', '-Dpybind11_DIR=/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/.eggs/pybind11-2.8.0-py3.9.egg/pybind11/share/cmake/pybind11', '-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE', '[email protected]_path', '-GNinja']' returned non-zero exit status 1.
----------------------------------------
ERROR: Failed building wheel for loop-tool-py
Running setup.py clean for loop-tool-py
Failed to build loop-tool-py
Installing collected packages: pybind11, loop-tool-py
Running setup.py install for loop-tool-py ... error
ERROR: Command errored out with exit status 1:
command: /Users/reshinthadithyan/miniforge3/envs/compiler_gym/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/setup.py'"'"'; __file__='"'"'/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-record-y6o8d6tp/install-record.txt --single-version-externally-managed --compile --install-headers /Users/reshinthadithyan/miniforge3/envs/compiler_gym/include/python3.9/loop-tool-py
cwd: /private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/
Complete output (47 lines):
running install
running build
running build_ext
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/build/temp.macosx-11.0-arm64-3.9/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/setup.py", line 105, in <module>
setup(
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/command/install.py", line 546, in run
self.run_command('build')
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/setup.py", line 95, in build_extension
subprocess.check_call(
File "/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/build/lib.macosx-11.0-arm64-3.9/', '-DPYTHON_EXECUTABLE=/Users/reshinthadithyan/miniforge3/envs/compiler_gym/bin/python3.9', '-DCMAKE_BUILD_TYPE=Release', '-Dpybind11_DIR=/Users/reshinthadithyan/miniforge3/envs/compiler_gym/lib/python3.9/site-packages/pybind11/share/cmake/pybind11', '-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE', '[email protected]_path', '-GNinja']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/reshinthadithyan/miniforge3/envs/compiler_gym/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/setup.py'"'"'; __file__='"'"'/private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-install-a37iha1m/loop-tool-py_85150e6f71984c46b08f1ad9c3e142b4/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/0s/v3y1q9xx1sg7n6bch4210qrr0000gn/T/pip-record-y6o8d6tp/install-record.txt --single-version-externally-managed --compile --install-headers /Users/reshinthadithyan/miniforge3/envs/compiler_gym/include/python3.9/loop-tool-py Check the logs for full command output.
Footnote
I was able to get the CPP binding working.