我正试图在我的clojure/leiningen学习过程中迈出下一步。
我想在我的clojure项目中导入deeplearning4j。通过一些研究,似乎可以通过maven使用leiningen来实现这一点。根据tutorial的说法,maven库来自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.有没有人能帮我弄明白我哪里搞错了?
谢谢!
发布于 2021-04-30 22:57:59
在你的project.clj中,使用id org.deeplearning4j/deeplearning4j-core,而不是org.deeplearning4j/deeplearning4j。您可能需要查看此information on Deeplearning4J dependencies,因为您可能还需要其他一些You。
https://stackoverflow.com/questions/67335971
复制相似问题