minerllabs / minerl

MineRL Competition for Sample Efficient Reinforcement Learning - Python Package
http://minerl.io/docs/
Other
709 stars 153 forks source link

pip install error (win10 wsl2) #761

Open Hqw-V opened 7 months ago

Hqw-V commented 7 months ago

I have java JDK on wsl. (both 'java -version' and 'javac -version' are right) I tried to install minerl with the command "pip install git+https://github.com/minerllabs/minerl@v1.0.1" After that, I git clone this repository and tried with the command "pip install e ." But they both lead to same error:

FAILURE: Build failed with an exception.

      * What went wrong:
      Execution failed for task ':compileJava'.
      > Compilation failed; see the compiler error output for details.

      * 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

      Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
      Use '--warning-mode all' to show the individual deprecation warnings.
      See https://docs.gradle.org/6.8.1/userguide/command_line_interface.html#sec:command_line_warnings

      BUILD FAILED in 3s
      6 actionable tasks: 6 executed
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/qw/code/minerl/setup.py", line 214, in <module>
          prep_mcp()
        File "/home/qw/code/minerl/setup.py", line 198, in prep_mcp
          subprocess.check_call('{} clean build shadowJar'.format(gradlew).split(' '), cwd=workdir)
        File "/home/qw/miniconda3/envs/steve/lib/python3.10/subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['./gradlew', 'clean', 'build', '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: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

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

I have checked many similar issues in the repo, but none of them work for me. My wsl config file is:

[wsl2]

memory=10GB 

# Sets the VM to use two virtual processors
processors=4

# Sets amount of swap storage space to 8GB, default is 25% of available RAM
swap=8GB

# Disable page reporting so WSL retains all allocated memory claimed from Windows and releases none back when free
pageReporting=false

# Turn on default connection to bind WSL 2 localhost to Windows localhost. Setting is ignored when networkingMode=mirrored
localhostforwarding=true

# Disables nested virtualization
nestedVirtualization=false
Miffyli commented 7 months ago

Hey. Can you share the full error log? This seems to be truncated.

Immediate thoughts: try installing pip install git+https://github.com/minerllabs/minerl (i.e., the newest main version on branch). v1.0.2 brought some fixes to the compilation which may be needed. Another thing is that you may need more RAM to install, however exit code 1 usually refers to some generic compilation issue. I have tested compilation to work on 16GB RAM, but it definitely fails on 8GB.