Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install error (win10 wsl2) #761

Open
Hqw-V opened this issue Apr 14, 2024 · 1 comment
Open

pip install error (win10 wsl2) #761

Hqw-V opened this issue Apr 14, 2024 · 1 comment

Comments

@Hqw-V
Copy link

Hqw-V commented Apr 14, 2024

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
Copy link
Contributor

Miffyli commented Apr 15, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants