Could not locate clojure/math/numeric_tower__init.class or clojure/math/numeric_tower.clj on classpath
Asked Answered
G

1

6

On a fresh lein install, when I start the repl via lein repl and enter into the repl:

(use 'clojure.math.numeric-tower)

It throws an error:

FileNotFoundException Could not locate clojure/math/numeric_tower__init.class or clojure/math/numeric_tower.clj on classpath.

I'm new to Clojure so I don't really know how to fix this.

Lein version: Leiningen 2.7.1 (lein -v)

Clojure version: 1.8.0 ( (clojure-version) )

Gerda answered 30/7, 2017 at 13:2 Comment(0)
G
7

Add [org.clojure/math.numeric-tower "0.0.4"] to the project's dependencies (in project.clj) and restart the repl.

Gradin answered 30/7, 2017 at 13:19 Comment(3)
It's a simple script. Not really a project. Do I need to keep a project.clj file?Gerda
You can use github.com/cemerick/pomegranate to add dependencies dynamically to classpath!Gradin
If you use lein repl then project.clj makes your life easier, but you can start the repl without the project.clj fileGradin

© 2022 - 2024 — McMap. All rights reserved.