没有名为“ray.rllib.agents.ppo.ppo_策略”的模块

2024-04-26 20:21:43 发布

您现在位置:Python中文网/ 问答频道 /正文

我有以下代码:

from copy import deepcopy
import json

import ray
try:
    from ray.rllib.agents.agent import get_agent_class
except ImportError:
    from ray.rllib.agents.registry import get_agent_class
from ray.rllib.agents.ppo.ppo_policy import PPOTFPolicy
from ray import tune
from ray.tune.registry import register_env
from ray.tune import run_experiments

我得到一个错误:

No module named 'ray.rllib.agents.ppo.ppo_policy'

我试过:

pip install ray;

Tags: 代码fromimportgetpolicyclassagentregistry