Eclectic-Sheep / sheeprl

Distributed Reinforcement Learning accelerated by Lightning Fabric
https://eclecticsheep.ai
Apache License 2.0
322 stars 33 forks source link

Error with sheeprl[minerl] installation #317

Open crocodile13 opened 2 months ago

crocodile13 commented 2 months ago

Hello, I can't install sheeprl[minerl] correctly. I'm probably bad, I can't solve the problem manually... any idea? Since no one seems to have encountered the problem, it's probably me who did something stupid... I am on ubuntu22, and i run in a venv.

Here is the error: (I used "[...]" to try not to put what seems to me to be useless)

[...] Successfully built sheeprl Installing collected packages: wcwidth, pure-eval, ptyprocess, mpmath, getch, farama-notifications, daemoniker, bullet, antlr4-python3-runtime, xmltodict, urllib3, typing-extensions, traitlets, tqdm, tomli, tensorboard-data-server, sympy, six, simple-term-menu, setuptools, serpent, PyYAML, python-dotenv, pyparsing, pygments, pygame, psutil, protobuf, prompt-toolkit, pluggy, pillow, pexpect, parso, packaging, nvidia-nvtx-cu12, nvidia-nvjitlink-cu12, nvidia-nccl-cu12, nvidia-curand-cu12, nvidia-cufft-cu12, nvidia-cuda-runtime-cu12, nvidia-cuda-nvrtc-cu12, nvidia-cuda-cupti-cu12, nvidia-cublas-cu12, numpy, networkx, multidict, mdurl, MarkupSafe, markdown, lxml, kiwisolver, iniconfig, inflection, idna, humanfriendly, grpcio, fsspec, frozenlist, fonttools, filelock, executing, exceptiongroup, dill, decorator, cycler, cloudpickle, charset-normalizer, certifi, attrs, async-timeout, aiohappyeyeballs, absl-py, yarl, werkzeug, triton, requests, python-dateutil, pytest, Pyro4, proglog, opencv-python, omegaconf, nvidia-cusparse-cu12, nvidia-cudnn-cu12, matplotlib-inline, markdown-it-py, lightning-utilities, jinja2, jedi, imageio-ffmpeg, imageio, gymnasium, gym, contourpy, coloredlogs, asttokens, aiosignal, tensorboard, stack-data, rich, nvidia-cusolver-cu12, moviepy, matplotlib, hydra-core, aiohttp, torch, ipython, torchmetrics, minerl, pytorch-lightning, lightning, sheeprl Attempting uninstall: setuptools Found existing installation: setuptools 59.6.0 Uninstalling setuptools-59.6.0: Successfully uninstalled setuptools-59.6.0 Running setup.py install for minerl ... error error: subprocess-exited-with-error

× Running setup.py install for minerl did not run successfully. │ exit code: 1 ╰─> [1524 lines of output] running install /home/user/IA/sheepRL/.venv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( [...] Downloading https://services.gradle.org/distributions/gradle-4.10.2-all.zip [...] .......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... Unzipping /tmp/pip-install-43dva_b4/minerl_4944ecc8f3d44aff8203959d4dcebe1f/build/lib.linux-x86_64-cpython-310/minerl/Malmo/Minecraft/run/gradle/wrapper/dists/gradle-4.10.2-all/9fahxiiecdb76a5g3aw9oi8rv/gradle-4.10.2-all.zip to /tmp/pip-install-43dva_b4/minerl_4944ecc8f3d44aff8203959d4dcebe1f/build/lib.linux-x86_64-cpython-310/minerl/Malmo/Minecraft/run/gradle/wrapper/dists/gradle-4.10.2-all/9fahxiiecdb76a5g3aw9oi8rv Set executable permissions for: /tmp/pip-install-43dva_b4/minerl_4944ecc8f3d44aff8203959d4dcebe1f/build/lib.linux-x86_64-cpython-310/minerl/Malmo/Minecraft/run/gradle/wrapper/dists/gradle-4.10.2-all/9fahxiiecdb76a5g3aw9oi8rv/gradle-4.10.2/bin/gradle

  Welcome to Gradle 4.10.2!

[...]
FAILURE: Build failed with an exception.

  * What went wrong:
  A problem occurred configuring root project 'Minecraft'.
  > Could not resolve all artifacts for configuration ':classpath'.
     > Could not find com.github.SpongePowered:MixinGradle:dcfaf61.
       Searched in the following locations:
         - https://jitpack.io/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
         - https://jitpack.io/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
         - https://jcenter.bintray.com/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
         - https://jcenter.bintray.com/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
         - https://repo.maven.apache.org/maven2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
         - https://repo.maven.apache.org/maven2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
         - https://maven.minecraftforge.net/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
         - https://maven.minecraftforge.net/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
         - https://oss.sonatype.org/content/repositories/snapshots/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
         - https://oss.sonatype.org/content/repositories/snapshots/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
         - https://plugins.gradle.org/m2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.pom
         - https://plugins.gradle.org/m2/com/github/SpongePowered/MixinGradle/dcfaf61/MixinGradle-dcfaf61.jar
       Required by:
           project :

  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  * Get more help at https://help.gradle.org

  BUILD FAILED in 17s
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/tmp/pip-install-43dva_b4/minerl_4944ecc8f3d44aff8203959d4dcebe1f/setup.py", line 167, in <module>
      setuptools.setup(
    File "/home/user/IA/sheepRL/.venv/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "/home/user/IA/sheepRL/.venv/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/home/user/IA/sheepRL/.venv/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/home/user/IA/sheepRL/.venv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/home/user/IA/sheepRL/.venv/lib/python3.10/site-packages/setuptools/dist.py", line 1208, in run_command
      super().run_command(command)
    File "/home/user/IA/sheepRL/.venv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/home/user/IA/sheepRL/.venv/lib/python3.10/site-packages/setuptools/command/install.py", line 68, in run
      return orig.install.run(self)
    File "/home/user/IA/sheepRL/.venv/lib/python3.10/site-packages/setuptools/_distutils/command/install.py", line 709, in run
      self.run_command(cmd_name)
    File "/home/user/IA/sheepRL/.venv/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/home/user/IA/sheepRL/.venv/lib/python3.10/site-packages/setuptools/dist.py", line 1208, in run_command
      super().run_command(command)
    File "/home/user/IA/sheepRL/.venv/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/home/user/IA/sheepRL/.venv/lib/python3.10/site-packages/setuptools/command/install_lib.py", line 11, in run
      self.build()
    File "/tmp/pip-install-43dva_b4/minerl_4944ecc8f3d44aff8203959d4dcebe1f/setup.py", line 88, in build
      build_minecraft(MALMO_DIR, os.path.join(
    File "/tmp/pip-install-43dva_b4/minerl_4944ecc8f3d44aff8203959d4dcebe1f/setup.py", line 141, in build_minecraft
      subprocess.check_call('{} -g run/gradle shadowJar'.format(gradlew).split(' '))
    File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['./gradlew', '-g', 'run/gradle', 'shadowJar']' returned non-zero exit status 1.
  [end of output]

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

× Encountered error while trying to install package. ╰─> minerl

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

Thanks in advance! :'(

michele-milesi commented 2 months ago

Hi @crocodile13, MineRL and MineDojo have some issues when installing them, you can take a look at this issue to solve your problem: https://github.com/MineDojo/MineDojo/issues/113. It is in the MineDojo repository, but the same applies for MineRL.

Let me know if you can solve it, Thanks