MineDreamer icon indicating copy to clipboard operation
MineDreamer copied to clipboard

Could not resolve all artifacts for configuration ':classpath' install 'MCP-Reborn'

Open Talnex opened this issue 10 months ago • 2 comments

When i install minerl by clone the https://github.com/Zhoues/minerl and run pip install . I got:

Processing /data/talnex/projects/minerl
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1452 lines of output]
      Cloning into 'MCP-Reborn'...
      Note: switching to '1.16.5-20210115'.

      You are in 'detached HEAD' state. You can look around, make experimental
      changes and commit them, and you can discard any commits you make in this
      state without impacting any branches by switching back to a branch.

      If you want to create a new branch to retain commits you create, you may
      do so (now or later) by using -c with the switch command. Example:

        git switch -c <new-branch-name>

      Or undo this operation with:

        git switch -

      Turn off this advice by setting config variable advice.detachedHead to false

      HEAD is now at 1e71be5 Update README.md
      Downloading https://services.gradle.org/distributions/gradle-4.9-all.zip

      Exception in thread "main" java.net.ConnectException: Connection timed out (Connection timed out)
          at java.net.PlainSocketImpl.socketConnect(Native Method)
          at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
          at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
          at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
          at java.net.Socket.connect(Socket.java:607)
          at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:293)
          at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
          at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
          at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
          at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
          at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:203)
          at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162)
          at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056)
          at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:189)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1572)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1500)
          at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
          at org.gradle.wrapper.Download.downloadInternal(Download.java:66)
          at org.gradle.wrapper.Download.download(Download.java:51)
          at org.gradle.wrapper.Install$1.call(Install.java:62)
          at org.gradle.wrapper.Install$1.call(Install.java:48)
          at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
          at org.gradle.wrapper.Install.createDist(Install.java:48)
          at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
          at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)

>>>>> many diff error
      |diff -u1 -rN MCP-Reborn-vanilla/src/main/java/net/minecraft/world/spawner/WorldEntitySpawner.java MCP-Reborn/src/main/java/net/minecraft/world/spawner/WorldEntitySpawner.java
      |--- MCP-Reborn-vanilla/src/main/java/net/minecraft/world/spawner/WorldEntitySpawner.java   2022-06-23 00:30:26.691515959 +0100
      |+++ MCP-Reborn/src/main/java/net/minecraft/world/spawner/WorldEntitySpawner.java   2022-06-23 00:28:27.361515359 +0100
      --------------------------
      File to patch:
      Skip this patch? [y]
      12 out of 12 hunks ignored
      The text leading up to this was:
      --------------------------
      |diff -u1 -rN MCP-Reborn-vanilla/src/main/java/net/minecraft/world/storage/AnvilSaveConverter.java MCP-Reborn/src/main/java/net/minecraft/world/storage/AnvilSaveConverter.java
      |--- MCP-Reborn-vanilla/src/main/java/net/minecraft/world/storage/AnvilSaveConverter.java   2022-06-23 00:30:26.691515959 +0100
      |+++ MCP-Reborn/src/main/java/net/minecraft/world/storage/AnvilSaveConverter.java   2022-06-23 00:28:27.361515359 +0100
      --------------------------
      File to patch:
      Skip this patch? [y]
      2 out of 2 hunks ignored
      The text leading up to this was:
      --------------------------
      |diff -u1 -rN MCP-Reborn-vanilla/src/main/java/net/minecraft/world/storage/SaveFormat.java MCP-Reborn/src/main/java/net/minecraft/world/storage/SaveFormat.java
      |--- MCP-Reborn-vanilla/src/main/java/net/minecraft/world/storage/SaveFormat.java   2022-06-23 00:30:26.691515959 +0100
      |+++ MCP-Reborn/src/main/java/net/minecraft/world/storage/SaveFormat.java   2022-06-23 00:28:27.361515359 +0100
      --------------------------
      File to patch:
      Skip this patch? [y]
      6 out of 6 hunks ignored
      Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details

      FAILURE: Build failed with an exception.

      * What went wrong:
      A problem occurred configuring root project 'mcprec'.
      > Could not resolve all artifacts for configuration ':classpath'.
         > Could not resolve net.minecraftforge.gradle:ForgeGradle:4.1.10.
           Required by:
               project :
            > Skipped due to earlier error
            > Could not resolve net.minecraftforge.gradle:ForgeGradle:4.1.10.
               > Could not get resource 'https://jcenter.bintray.com/net/minecraftforge/gradle/ForgeGradle/4.1.10/ForgeGradle-4.1.10.pom'.
                  > Could not GET 'https://jcenter.bintray.com/net/minecraftforge/gradle/ForgeGradle/4.1.10/ForgeGradle-4.1.10.pom'.
                     > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/34.95.74.180] failed: connect timed out
         > Could not resolve com.github.jengelman.gradle.plugins:shadow:4.0.4.
           Required by:
               project :
            > Skipped due to earlier error
            > Could not resolve com.github.jengelman.gradle.plugins:shadow:4.0.4.
               > Could not get resource 'https://jcenter.bintray.com/com/github/jengelman/gradle/plugins/shadow/4.0.4/shadow-4.0.4.pom'.
                  > Could not GET 'https://jcenter.bintray.com/com/github/jengelman/gradle/plugins/shadow/4.0.4/shadow-4.0.4.pom'.
                     > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/34.95.74.180] failed: connect timed out
         > Could not resolve net.minecraftforge:binarypatcher:1.+.
           Required by:
               project :
            > Failed to list versions for net.minecraftforge:binarypatcher.
               > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/net/minecraftforge/binarypatcher/maven-metadata.xml.
                  > Could not get resource 'https://repo.maven.apache.org/maven2/net/minecraftforge/binarypatcher/maven-metadata.xml'.
                     > Could not GET 'https://repo.maven.apache.org/maven2/net/minecraftforge/binarypatcher/maven-metadata.xml'.
                        > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/146.75.24.215] failed: connect timed out

      * 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 3m 16s

      FAILURE: Build failed with an exception.

      * What went wrong:
      A problem occurred configuring root project 'mcprec'.
      > Could not resolve all artifacts for configuration ':classpath'.
         > Could not resolve net.minecraftforge.gradle:ForgeGradle:4.1.10.
           Required by:
               project :
            > Skipped due to earlier error
            > Could not resolve net.minecraftforge.gradle:ForgeGradle:4.1.10.
               > Could not get resource 'https://jcenter.bintray.com/net/minecraftforge/gradle/ForgeGradle/4.1.10/ForgeGradle-4.1.10.pom'.
                  > Could not GET 'https://jcenter.bintray.com/net/minecraftforge/gradle/ForgeGradle/4.1.10/ForgeGradle-4.1.10.pom'.
                     > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/34.95.74.180] failed: connect timed out
         > Could not resolve com.github.jengelman.gradle.plugins:shadow:4.0.4.
           Required by:
               project :
            > Skipped due to earlier error
            > Could not resolve com.github.jengelman.gradle.plugins:shadow:4.0.4.
               > Could not get resource 'https://jcenter.bintray.com/com/github/jengelman/gradle/plugins/shadow/4.0.4/shadow-4.0.4.pom'.
                  > Could not GET 'https://jcenter.bintray.com/com/github/jengelman/gradle/plugins/shadow/4.0.4/shadow-4.0.4.pom'.
                     > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/34.95.74.180] failed: connect timed out
         > Could not resolve net.minecraftforge:binarypatcher:1.+.
           Required by:
               project :
            > Failed to list versions for net.minecraftforge:binarypatcher.
               > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/net/minecraftforge/binarypatcher/maven-metadata.xml.
                  > Could not get resource 'https://repo.maven.apache.org/maven2/net/minecraftforge/binarypatcher/maven-metadata.xml'.
                     > Could not GET 'https://repo.maven.apache.org/maven2/net/minecraftforge/binarypatcher/maven-metadata.xml'.
                        > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.76.215] failed: connect timed out

      * 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 3m 16s

      FAILURE: Build failed with an exception.

      * What went wrong:
      A problem occurred configuring root project 'mcprec'.
      > Could not resolve all artifacts for configuration ':classpath'.
         > Could not resolve net.minecraftforge.gradle:ForgeGradle:4.1.10.
           Required by:
               project :
            > Skipped due to earlier error
            > Could not resolve net.minecraftforge.gradle:ForgeGradle:4.1.10.
               > Could not get resource 'https://jcenter.bintray.com/net/minecraftforge/gradle/ForgeGradle/4.1.10/ForgeGradle-4.1.10.pom'.
                  > Could not GET 'https://jcenter.bintray.com/net/minecraftforge/gradle/ForgeGradle/4.1.10/ForgeGradle-4.1.10.pom'.
                     > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/34.95.74.180] failed: connect timed out
         > Could not resolve com.github.jengelman.gradle.plugins:shadow:4.0.4.
           Required by:
               project :
            > Skipped due to earlier error
            > Could not resolve com.github.jengelman.gradle.plugins:shadow:4.0.4.
               > Could not get resource 'https://jcenter.bintray.com/com/github/jengelman/gradle/plugins/shadow/4.0.4/shadow-4.0.4.pom'.
                  > Could not GET 'https://jcenter.bintray.com/com/github/jengelman/gradle/plugins/shadow/4.0.4/shadow-4.0.4.pom'.
                     > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/34.95.74.180] failed: connect timed out
         > Could not resolve net.minecraftforge:binarypatcher:1.+.
           Required by:
               project :
            > Failed to list versions for net.minecraftforge:binarypatcher.
               > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/net/minecraftforge/binarypatcher/maven-metadata.xml.
                  > Could not get resource 'https://repo.maven.apache.org/maven2/net/minecraftforge/binarypatcher/maven-metadata.xml'.
                     > Could not GET 'https://repo.maven.apache.org/maven2/net/minecraftforge/binarypatcher/maven-metadata.xml'.
                        > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.76.215] failed: connect timed out

      * 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 3m 19s
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/data/talnex/projects/minerl/setup.py", line 214, in <module>
          prep_mcp()
        File "/data/talnex/projects/minerl/setup.py", line 193, in prep_mcp
          raise e
        File "/data/talnex/projects/minerl/setup.py", line 190, in prep_mcp
          subprocess.check_call('{} downloadAssets'.format(gradlew).split(' '), cwd=workdir)
        File "/home/talnex/anaconda3/envs/rl/lib/python3.10/subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['./gradlew', 'downloadAssets']' 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.

and when i try to download by "wget https://jcenter.bintray.com/net/minecraftforge/gradle/ForgeGradle/4.1.10/ForgeGradle-4.1.10.pom" I got

Proxy request sent, awaiting response... 404 Not Found
2024-04-17 22:15:01 ERROR 404: Not Found.

Talnex avatar Apr 17 '24 14:04 Talnex

Downloading https://services.gradle.org/distributions/gradle-4.9-all.zip Exception in thread "main" java.net.ConnectException: Connection timed out (Connection timed out)

It seems that currently, downloading the corresponding Gradle version is not possible, indicating a poor network connection. This is a common issue, and I've encountered similar situations before. In such cases, opting for a high-performance server located in the US can help with installation. It's worth noting that even after installing Gradle, compiling requires a significant amount of CPU memory (>=7GB), and this process can easily fail. The errors encountered during this process are often related to Gradle.

Proxy request sent, awaiting response... 404 Not Found 2024-04-17 22:15:01 ERROR 404: Not Found.

I didn't attempt to install Gradle separately. You can check the official repository's issues on MineRL to see if there are similar approaches suggested there.

Of course, we also offer pre-compiled containers, which you can choose to use to mitigate many issues. Additionally, if you encounter too many users facing this download error, you can consider providing alternative links for downloading.

curl http://43.159.131.178:8000/base-vgl-env.sif -O base-vgl-env.sif

Zhoues avatar Apr 17 '24 17:04 Zhoues

Thank you for your reply. In the past two weeks, I have tried many methods to install minerl

  1. Set gradle to use a proxy pointing to the United States, but it is not so easy to configure and stable.
  2. Download apptainer and build the image. Since the GPU platform I am using is based on container technology and cannot open a container within a container, so this does not work for me.
  3. Finally, I rented a US cloud server, compiled the wheel file on it,uploaded it and installed it on my GPU server. I provide a python3.10 .whl file for download. https://drive.google.com/file/d/19dcn9bQ85QGMEYRqvuYYYgGU4jRwZd8j/view?usp=sharing

Talnex avatar Apr 29 '24 09:04 Talnex

Thank you for your reply. In the past two weeks, I have tried many methods to install minerl

  1. Set gradle to use a proxy pointing to the United States, but it is not so easy to configure and stable.
  2. Download apptainer and build the image. Since the GPU platform I am using is based on container technology and cannot open a container within a container, so this does not work for me.
  3. Finally, I rented a US cloud server, compiled the wheel file on it,uploaded it and installed it on my GPU server. I provide a python3.10 .whl file for download. https://drive.google.com/file/d/19dcn9bQ85QGMEYRqvuYYYgGU4jRwZd8j/view?usp=sharing

Great, thank you very much for your help, I will also update it in the repository where MineRL is installed!

Zhoues avatar May 02 '24 06:05 Zhoues