takuseno / d3rlpy

An offline deep reinforcement learning library

Home Page:https://takuseno.github.io/d3rlpy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

d3rlpy install d4rl

sky-story opened this issue · comments

Hi,
First, I want to say thank you for making such a wonderful library.

I checked that you solved this problem before. #349
But I am facing the following error.
I am using the latest d3rlpy==2.5.0
but when I implement:

$ pip uninstall d4rl gym
$ d3rlpy install d4rl

it occurs

(drl_project) lnb@lnb-Lenovo-Legion-R9000P2021H:~/d3rlpy$ pip uninstall d4rl gymWARNING: Skipping d4rl as it is not installed.
Found existing installation: gym 0.26.2
Uninstalling gym-0.26.2:
  Would remove:
    /home/lnb/anaconda3/envs/drl_project/lib/python3.8/site-packages/gym-0.26.2.dist-info/*
    /home/lnb/anaconda3/envs/drl_project/lib/python3.8/site-packages/gym/*
Proceed (Y/n)? y
  Successfully uninstalled gym-0.26.2
(drl_project) lnb@lnb-Lenovo-Legion-R9000P2021H:~/d3rlpy$ d3rlpy install d4rl
Traceback (most recent call last):
  File "/home/lnb/anaconda3/envs/drl_project/bin/d3rlpy", line 5, in <module>
    from d3rlpy.cli import cli
  File "/home/lnb/anaconda3/envs/drl_project/lib/python3.8/site-packages/d3rlpy/__init__.py", line 6, in <module>
    from . import (
  File "/home/lnb/anaconda3/envs/drl_project/lib/python3.8/site-packages/d3rlpy/algos/__init__.py", line 1, in <module>
    from .qlearning import *
  File "/home/lnb/anaconda3/envs/drl_project/lib/python3.8/site-packages/d3rlpy/algos/qlearning/__init__.py", line 1, in <module>
    from .awac import *
  File "/home/lnb/anaconda3/envs/drl_project/lib/python3.8/site-packages/d3rlpy/algos/qlearning/awac.py", line 5, in <module>
    from ...base import DeviceArg, LearnableConfig, register_learnable
  File "/home/lnb/anaconda3/envs/drl_project/lib/python3.8/site-packages/d3rlpy/base.py", line 7, in <module>
    from gym.spaces import Box
ModuleNotFoundError: No module named 'gym'

Can you tell me how to fix this? Thank you!

@sky-story Hi, thanks for the issue. I think this will resolve your issue:

$ pip install gym
$ d3rlpy install d4rl

@sky-story Hi, thanks for the issue. I think this will resolve your issue:

$ pip install gym
$ d3rlpy install d4rl

Thanks for your quick and accurate response! I wonder if these commands still work on d3rlpy==2.5.0

pip install d3rlpy
pip install git+https://github.com/Farama-Foundation/D4RL
pip install -U gym
pip uninstall pybullet

What's more,when I run the example:

import d3rlpy

# prepare dataset
dataset, env = d3rlpy.datasets.get_d4rl('hopper-medium-v0')

# prepare algorithm
cql = d3rlpy.algos.CQLConfig().create(device='cuda:0')

# train
cql.fit(
    dataset,
    n_steps=100000,
    evaluators={"environment": d3rlpy.metrics.EnvironmentEvaluator(env)},
)

I encountered the following error message,it reminds me to update my NVIDIA driver:
RuntimeError: The NVIDIA driver on your system is too old (found version 11040).
Currently, I'm running Ubuntu 18.04.

Previously, I reinstalled the NVIDIA driver, downgrading it from version 535 to 470, as recommended by Ubuntu 18.04. After doing so, my other projects ran smoothly.

Now, I'm concerned about potential conflicts if I update the NVIDIA driver on my Ubuntu 18.04 system. Is there a risk of conflict with system drivers if I perform this update?

Additionally, I'm curious if there's a method to run d3rlpy&d4rl on the current version of the NVIDIA driver (version 11040). Any insights or suggestions would be greatly appreciated!

I wonder if these commands still work on d3rlpy==2.5.0

pip install d3rlpy
pip install git+https://github.com/Farama-Foundation/D4RL
pip install -U gym
pip uninstall pybullet

d3rlpy install d4rl is essentially doing the exactly the same in background.

Additionally, I'm curious if there's a method to run d3rlpy&d4rl on the current version of the NVIDIA driver (version 11040).

d3rlpy is nothing to do with nvidia drivers. If PyTorch runs, d3rlpy also runs. In this thread, I can't provide any further information about the nvidia-driver issue.

I wonder if these commands still work on d3rlpy==2.5.0

pip install d3rlpy
pip install git+https://github.com/Farama-Foundation/D4RL
pip install -U gym
pip uninstall pybullet

d3rlpy install d4rl is essentially doing the exactly the same in background.

Additionally, I'm curious if there's a method to run d3rlpy&d4rl on the current version of the NVIDIA driver (version 11040).

d3rlpy is nothing to do with nvidia drivers. If PyTorch runs, d3rlpy also runs. In this thread, I can't provide any further information about the nvidia-driver issue.

Thanks for your kind response!I would search other method to solve it.
I will close this issue.
Thank you !