# Build ray from source failed on apple m3

**URL:** https://discuss.ray.io/t/build-ray-from-source-failed-on-apple-m3/14222
**Category:** Uncategorized
**Created:** [March 31, 2024, 4:31am UTC](https://discuss.ray.io/t/build-ray-from-source-failed-on-apple-m3/14222 "2024-03-31T04:31:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![xiaobo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/xiaobo/32/5934_2.png) [@xiaobo](https://discuss.ray.io/u/xiaobo)
#### Post date: [March 31, 2024, 4:31am UTC](https://discuss.ray.io/t/build-ray-from-source-failed-on-apple-m3/14222/1 "2024-03-31T04:31:37Z")

</div>

Hi, building ray 2.10.0 on macos with m3 failed with the following error:  
Computing main repo mapping:  
Loading:  
Loading: 0 packages loaded  
Analyzing: 2 targets (2 packages loaded, 0 targets configured)  
Analyzing: 2 targets (2 packages loaded, 0 targets configured)  
[0 / 1] checking cached actions  
ERROR: /private/var/tmp/\_bazel\_guxiaobo/d275183569699e5f6e49e8ef5050c6a5/external/com\_google\_protobuf/src/google/protobuf/BUILD.bazel:129:8: @@com\_google\_protobuf//src/google/protobuf:gen\_wkt\_cc\_sources: no such attribute ‘exec\_tools’ in ‘genrule’ rule (did you mean ‘executable’?)  
ERROR: /private/var/tmp/\_bazel\_guxiaobo/d275183569699e5f6e49e8ef5050c6a5/external/com\_google\_protobuf/BUILD.bazel:82:6: Target ‘@@com\_google\_protobuf//src/google/protobuf:wrappers\_proto’ contains an error and its package is in error and referenced by ‘@@com\_google\_protobuf//:wrappers\_proto’  
ERROR: Analysis of target ‘//:ray\_pkg’ failed; build aborted: Analysis failed  
INFO: Elapsed time: 9.860s, Critical Path: 0.02s  
INFO: 1 process: 1 internal.  
ERROR: Build did NOT complete successfully  
FAILED:  
Traceback (most recent call last):  
File “”, line 2, in   
File “”, line 34, in   
File “/Users/guxiaobo/Documents/GitHub/ray-2.10.0/python/setup.py”, line 754, in   
setuptools.setup(  
File “/opt/anaconda3/envs/rayenv/lib/python3.9/site-packages/setuptools/ **init**.py”, line 153, in setup  
return distutils.core.setup(\*\*attrs)  
File “/opt/anaconda3/envs/rayenv/lib/python3.9/distutils/core.py”, line 148, in setup  
dist.run\_commands()  
File “/opt/anaconda3/envs/rayenv/lib/python3.9/distutils/dist.py”, line 966, in run\_commands  
self.run\_command(cmd)  
File “/opt/anaconda3/envs/rayenv/lib/python3.9/distutils/dist.py”, line 985, in run\_command  
cmd\_obj.run()  
File “/opt/anaconda3/envs/rayenv/lib/python3.9/site-packages/setuptools/command/develop.py”, line 34, in run  
self.install\_for\_development()  
File “/opt/anaconda3/envs/rayenv/lib/python3.9/site-packages/setuptools/command/develop.py”, line 114, in install\_for\_development  
self.run\_command(‘build\_ext’)  
File “/opt/anaconda3/envs/rayenv/lib/python3.9/distutils/cmd.py”, line 313, in run\_command  
self.distribution.run\_command(command)  
File “/opt/anaconda3/envs/rayenv/lib/python3.9/distutils/dist.py”, line 985, in run\_command  
cmd\_obj.run()  
File “/Users/guxiaobo/Documents/GitHub/ray-2.10.0/python/setup.py”, line 742, in run  
return pip\_run(self)  
File “/Users/guxiaobo/Documents/GitHub/ray-2.10.0/python/setup.py”, line 646, in pip\_run  
build(True, BUILD\_JAVA, True)  
File “/Users/guxiaobo/Documents/GitHub/ray-2.10.0/python/setup.py”, line 594, in build  
return bazel\_invoke(  
File “/Users/guxiaobo/Documents/GitHub/ray-2.10.0/python/setup.py”, line 373, in bazel\_invoke  
result = invoker([cmd] + cmdline, \*args, \*\*kwargs)  
File “/opt/anaconda3/envs/rayenv/lib/python3.9/subprocess.py”, line 373, in check\_call  
raise CalledProcessError(retcode, cmd)  
subprocess.CalledProcessError: Command ‘[‘bazel’, ‘build’, ‘–verbose\_failures’, ‘–’, ‘//:ray\_pkg’, ‘//cpp:ray\_cpp\_pkg’]’ returned non-zero exit status 1.  
error: subprocess-exited-with-error

```
× python setup.py develop did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /opt/anaconda3/envs/rayenv/bin/python3.9 -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
# import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
# setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
# manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize

try:
    import setuptools
except ImportError as error:
    print(
        "ERROR: Can not execute `setup.py` since setuptools is not available in "
        "the build environment.",
        file=sys.stderr,
    )
    sys.exit(1)

__file__ = %r
sys.argv[0] = __file__

if os.path.exists( __file__ ):
    filename = __file__
    with tokenize.open( __file__ ) as f:
        setup_py_code = f.read()
else:
    filename = "<auto-generated setuptools caller>"
    setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'/Users/guxiaobo/Documents/GitHub/ray-2.10.0/python/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' develop --no-deps
cwd: /Users/guxiaobo/Documents/GitHub/ray-2.10.0/python/

```

error: subprocess-exited-with-error

× python setup.py develop did not run successfully.  
│ exit code: 1  
╰─\> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
