I am trying to take a next step in my clojure/leiningen learning process.
I would like to import 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 .
The process I expected to work was to look for the library (deeplearning4j in this case) and add it to the project.clj
as such:
(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"]}})
But I get the error:
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.
I tried to add in the :repositories
key, but also with no luck:
(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/"]])
got me the error:
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.
Could anyone help me understand what I am getting wrong?
Thx!
In your project.clj
, use id org.deeplearning4j/deeplearning4j-core
, not org.deeplearning4j/deeplearning4j
. You may need to look at this information on Deeplearning4J dependencies as you may need some others.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.