clojure - leiningen 无法通过 Maven 找到 deeplearning4j 神器

clojure - leiningen could not find deeplearning4j artifact via maven

我正努力在 clojure/leiningen 学习过程中迈出下一步。

我想导入deeplearning4j in my clojure project. Doing some research, it seems possible to do it with leiningen via maven. According to the tutorial, the maven libraries are from here

我希望工作的过程是查找库(在本例中为 deeplearning4j)并将其添加到 project.clj 中:

(defproject to-remove "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url "https://www.eclipse.org/legal/epl-2.0/"}
  :dependencies [[org.clojure/clojure "1.10.1"]
                 [org.deeplearning4j/deeplearning4j "1.0.0-beta7"]]
  :main ^:skip-aot to-remove.core
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all
                       :jvm-opts ["-Dclojure.compiler.direct-linking=true"]}})

但我收到错误:

Could not find artifact org.deeplearning4j:deeplearning4j:jar:1.0.0-beta7 in central (https://repo1.maven.org/maven2/)
Could not find artifact org.deeplearning4j:deeplearning4j:jar:1.0.0-beta7 in clojars (https://repo.clojars.org/)
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.

我尝试添加 :repositories 键,但也没有成功:

(defproject to-remove "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url "https://www.eclipse.org/legal/epl-2.0/"}
  :dependencies [[org.clojure/clojure "1.10.1"]
                 [org.deeplearning4j/deeplearning4j "1.0.0-beta7"]]
  :main ^:skip-aot to-remove.core
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all
                       :jvm-opts ["-Dclojure.compiler.direct-linking=true"]}}
  :repositories [["maven-org" "https://search.maven.org/"]
                 ["maven-source" "https://mvnrepository.com/"]])

我得到了错误:

Retrieving org/deeplearning4j/deeplearning4j/1.0.0-beta7/deeplearning4j-1.0.0-beta7.jar from maven-org
Retrieving org/deeplearning4j/deeplearning4j/1.0.0-beta7/deeplearning4j-1.0.0-beta7.jar from maven-org
Apr 30, 2021 11:41:12 AM org.apache.http.client.protocol.ResponseProcessCookies processCookies
WARNING: Invalid cookie header: "Set-Cookie: MVN_SESSION=eyJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVpZCI6IjFjMTU0ZTQxLWE5YzItMTFlYi1hOTA5LTBiOWZkMzcxZjc1ZiJ9LCJleHAiOjE2NTEzMjk2NzIsIm5iZiI6MTYxOTc5MzY3MiwiaWF0IjoxNjE5NzkzNjcyfQ.onpYZCJmVMQt6ue-orMHPFCR6XxJb896QwbpMylElf4; Max-Age=31536000; Expires=Sat, 30 Apr 2022 14:41:12 GMT; SameSite=Lax; Path=/; HTTPOnly". Invalid 'expires' attribute: Sat, 30 Apr 2022
14:41:12 GMT
Could not find artifact org.deeplearning4j:deeplearning4j:jar:1.0.0-beta7 in central (https://repo1.maven.org/maven2/)
Could not find artifact org.deeplearning4j:deeplearning4j:jar:1.0.0-beta7 in clojars (https://repo.clojars.org/)
Could not transfer artifact org.deeplearning4j:deeplearning4j:jar:1.0.0-beta7 from/to maven-org (https://search.maven.org/): Checksum
validation failed, expected <!-- but is 6316efb328e43503f4e6869fa876dc6eb0e7a39b
Could not find artifact org.deeplearning4j:deeplearning4j:jar:1.0.0-beta7 in maven-source (https://mvnrepository.com/)
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.

任何人都可以帮助我理解我做错了什么吗?

谢谢!

在您的 project.clj 中,使用 ID org.deeplearning4j/deeplearning4j-core,而不是 org.deeplearning4j/deeplearning4j。您可能需要查看此 information on Deeplearning4J dependencies,因为您可能还需要其他一些。