Open
Description
Describe the bug
On following ml-agents documentation, the installation of ml-agents fails on Apple Silicon.
To Reproduce
Steps to reproduce the behavior:
- Create conda environment with the appropriate Python with
conda create -n mlagents python=3.10.12 && conda activate mlagents
- Clone release 22 mlagents repo
git clone --branch release_22 https://github.com/Unity-Technologies/ml-agents.git
- Instal ml-agents environment
python -m pip install ./ml-agents-envs
- See error
Console logs / stack traces
Building wheel for grpcio (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [191468 lines of output]
...lots of lines here...
Traceback (most recent call last):
File "/private/var/folders/sc/szj0xskd0j7dl7sfsv25kymr0000gn/T/pip-install-kmt3zfp2/grpcio_da20be3150034e0399157b38a246d42f/src/python/grpcio/commands.py", line 280, in build_extensions
build_ext.build_ext.build_extensions(self)
File "/opt/anaconda3/envs/mlagents/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 484, in build_extensions
self._build_extensions_serial()
File "/opt/anaconda3/envs/mlagents/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 510, in _build_extensions_serial
self.build_extension(ext)
File "/opt/anaconda3/envs/mlagents/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 264, in build_extension
_build_ext.build_extension(self, ext)
File "/opt/anaconda3/envs/mlagents/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 565, in build_extension
objects = self.compiler.compile(
File "/private/var/folders/sc/szj0xskd0j7dl7sfsv25kymr0000gn/T/pip-install-kmt3zfp2/grpcio_da20be3150034e0399157b38a246d42f/src/python/grpcio/_parallel_compile_patch.py", line 58, in _parallel_compile
multiprocessing.pool.ThreadPool(BUILD_EXT_COMPILER_JOBS).map(
File "/opt/anaconda3/envs/mlagents/lib/python3.10/multiprocessing/pool.py", line 367, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/opt/anaconda3/envs/mlagents/lib/python3.10/multiprocessing/pool.py", line 774, in get
raise self._value
File "/opt/anaconda3/envs/mlagents/lib/python3.10/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/opt/anaconda3/envs/mlagents/lib/python3.10/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/private/var/folders/sc/szj0xskd0j7dl7sfsv25kymr0000gn/T/pip-install-kmt3zfp2/grpcio_da20be3150034e0399157b38a246d42f/src/python/grpcio/_parallel_compile_patch.py", line 54, in _compile_single_file
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/private/var/folders/sc/szj0xskd0j7dl7sfsv25kymr0000gn/T/pip-install-kmt3zfp2/grpcio_da20be3150034e0399157b38a246d42f/src/python/grpcio/commands.py", line 263, in new_compile
return old_compile(obj, src, ext, cc_args, extra_postargs,
File "/opt/anaconda3/envs/mlagents/lib/python3.10/site-packages/setuptools/_distutils/compilers/C/unix.py", line 223, in _compile
raise CompileError(msg)
distutils.compilers.C.errors.CompileError: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for grpcio
Running setup.py clean for grpcio
Successfully built mlagents_envs
Failed to build grpcio
Environment (please complete the following information):
- Unity 6000.1
- macOS 15.5 (24F74) Sequoia
- ML-Agents Release 22