dreamerv3复现教程
- 1、dreamerv3基础安装
- 2、gym==0.19.0安装
- 3、JDK8安装
- 4、mineRL0.4.4安装
- 5、diamond_env安装
由于dreamerv3存在很多版本冲突问题,所以很难直接使用和复现
1、dreamerv3基础安装
conda env list
conda create -n dreamerv3 python=3.12
conda activate dreamerv3
git clone https://github.com/danijar/dreamerv3
pip install -U -r embodied/requirements.txt
pip install -U -r dreamerv3/requirements.txt -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
pip install crafter
pip install gym=0.22.0
python example.py
2、gym==0.19.0安装
pip uninstall gym
pip install setuptools==63.2.0
python -m pip install pip==24.0
pip install gym==0.19.0
╰─> [11 lines of output]
Traceback (most recent call last):
File “”, line 2, in
File “”, line 14, in
File “/villa/ftt/anaconda3/envs/test/lib/python3.12/site-packages/setuptools/init.py”, line 16, in
import setuptools.version
File “/villa/ftt/anaconda3/envs/test/lib/python3.12/site-packages/setuptools/version.py”, line 1, in
import pkg_resources
File “/villa/ftt/anaconda3/envs/test/lib/python3.12/site-packages/pkg_resources/init.py”, line 2191, in
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module ‘pkgutil’ has no attribute ‘ImpImporter’. Did you mean: ‘zipimporter’?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
解决方案:手动替换
wheel.vendored.packaging.requirements.InvalidRequirement: Expected end or semicolon (after version specifier)
opencv-python>=3.
~~~^
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for gym
解决方案:修改init函数
3、JDK8安装
# JDK[免登录下载](https://helpx.adobe.com/coldfusion/kb/coldfusion-downloads.html#downloads3)
jdk-8u421-linux-x64.tar.gz
tar -zxvf jdk-8u421-linux-x64.tar.gz
# 修改java的编译环境
vim .bashrc
> export JAVA_HOME=~/packet/jdk1.8.0_421
> export PATH=$JAVA_HOME/bin:$PATH
source .bashrc
4、mineRL0.4.4安装
# mineRL0.4.4版本下载
git clone https://github.com/minerllabs/minerl.git
conda install -c hcc gradle
> def __init__(self, requirement_string: str) -> None:
try:
if requirement_string.find('opencv-python>=3.')>=0:
requirement_string += "0" # opencv-python>=3.0
parsed = _parse_requirement(requirement_string)
except ParserSyntaxError as e:
raise InvalidRequirement(str(e)) from e
try:
parsed = _parse_requirement(requirement_string)
except ParserSyntaxError as e:
raise InvalidRequirement(str(e)) from e
5、diamond_env安装
# diamond_env下载
pip install diamond_env
conda remove --name dreamerv3 --all