redis PermissionError when ray.init()

dsekswqp  于 12个月前  发布在  Redis
关注(0)|答案(1)|浏览(203)

我克隆了一个conda环境到新的计算机,并运行一个ray项目,但遇到了错误。我发现这个错误发生在ray.init()时,详细代码和信息如下:

>>> import ray
>>> ray.init()
2023-11-17 17:26:16,023 INFO resource_spec.py:212 -- Starting Ray with 33.89 GiB memory available for workers and up to 16.97 GiB for objects. You can adjust these settings with ray.init(memory=<bytes>, object_store_memory=<bytes>).
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/anaconda3/envs/ncd/lib/python3.7/site-packages/ray/worker.py", line 767, in init
    ray_params=ray_params)
  File "/root/anaconda3/envs/ncd/lib/python3.7/site-packages/ray/node.py", line 177, in __init__
    self.start_head_processes()
  File "/root/anaconda3/envs/ncd/lib/python3.7/site-packages/ray/node.py", line 649, in start_head_processes
    self.start_redis()
  File "/root/anaconda3/envs/ncd/lib/python3.7/site-packages/ray/node.py", line 473, in start_redis
    fate_share=self.kernel_fate_share)
  File "/root/anaconda3/envs/ncd/lib/python3.7/site-packages/ray/services.py", line 769, in start_redis
    fate_share=fate_share)
  File "/root/anaconda3/envs/ncd/lib/python3.7/site-packages/ray/services.py", line 943, in _start_redis_instance
    fate_share=fate_share)
  File "/root/anaconda3/envs/ncd/lib/python3.7/site-packages/ray/services.py", line 514, in start_ray_process
    preexec_fn=preexec_fn if sys.platform != "win32" else None)
  File "/root/anaconda3/envs/ncd/lib/python3.7/subprocess.py", line 800, in __init__
    restore_signals, start_new_session)
  File "/root/anaconda3/envs/ncd/lib/python3.7/subprocess.py", line 1551, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/root/anaconda3/envs/ncd/lib/python3.7/site-packages/ray/core/src/ray/thirdparty/redis/src/redis-server'

字符串
我检查了文件权限,但仍然不知道是什么问题。drwxr-xr-x 12 root root 4096 Nov 17 16:53 ncd
我想修复权限错误。

x6h2sr28

x6h2sr281#

我使用“chmod 777”命令手动删除了所有提示文件的权限,问题得到了解决。

相关问题