Closed whewage closed 8 months ago
@whewage, I'm not sure that your problem has anything to do with Clojupyter. What code did you try to execute when it failed?
@genmeblog, does this sound familiar to you? Are you aware of any issues with using cljplot in Clojupyter?
Looks like it's not related to cljplot. Here is some hint: https://github.com/dm3/clojure.java-time/issues/37 You can try also to bump java-time to 0.3.3
btw. I want to recommend to update cljplot
(https://clojars.org/cljplot/versions/0.0.2a-SNAPSHOT). Also, remove clojure2d
and fastmath
dependencies since cljplot
will load them in proper versions.
Apologies for the late reply - I'm maintaining this in my spare time.
I've been looking into this and unfortunately I can no longer support installation via conda. Instead I recommend building the latest version locally via the following commands (requires clojure CLI and deps tools):
Checkout this repo on the master branch and build an uberjar:
Building an uberjar:
clj -T:build uber
WARNING: parse-boolean already refers to: #'clojure.core/parse-boolean in namespace: omniconf.core, being replaced by: #'omniconf.core/parse-boolean
target/clojupyter-0.4.321-standalone.jar
clj -M -m clojupyter.cmdline install --jarfile target/clojupyter-0.4.321-standalone.jar --ident clojupyter-0.4.321
Verify:
clj -M -m clojupyter.cmdline list-installs
WARNING: parse-boolean already refers to: #'clojure.core/parse-boolean in namespace: omniconf.core, being replaced by: #'omniconf.core/parse-boolean
Clojupyter v0.4.321@321 - All Clojupyter kernels
| IDENT | DIR |
|--------------------+----------------------------------------------|
| clojupyter-0.4.321 | ~/Library/Jupyter/kernels/clojupyter-0.4.321 |
exit(0)
Install jupyterlab if you haven't already. On MacOS you might do:
brew install jupyterlab
Validate that it's working:
jupyter lab --version
4.0.9
Now you can try a console:
jupyter-console --kernel=clojupyter-0.4.321
WARNING: parse-boolean already refers to: #'clojure.core/parse-boolean in namespace: omniconf.core, being replaced by: #'omniconf.core/parse-boolean
Jupyter console 6.6.3
Clojupyter (0.4.321)
Or you can run in jupyter lab (from this repo):
jupyter lab
then open a file like: examples/demo-clojupyter.ipynb and run all cells.
You can also use this as a library - here's an example: https://github.com/krukow/edmondson
I am using Clojure for gaussian process (generateme/fastmath library ) and "cljplot" for graph visualization. It works well with fastmath but when I try to use cljplot it gives me the following error. Dependencies used --> [org.clojure/clojure "1.10.1"] [clojure2d "1.2.0-SNAPSHOT"] [generateme/fastmath "1.4.0-SNAPSHOT"] [clojure.java-time "0.3.2"] [cljplot "0.0.2-SNAPSHOT"] [org.clojure/data.json "1.0.0"] ;;;;;;;;;; java.lang.IllegalAccessError: tried to access field clojure.lang.APersistentVector._hash from class clojure.lang.PersistentUnrolledVector$Card1 at clojure.lang.PersistentUnrolledVector$Card1.hashCode(PersistentUnrolledVector.java:253) at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936) at java_time.potemkin.util$fast_memoize$fn15133.invoke(util.clj:48) at java_time.defconversion$combinations.invokeStatic(defconversion.clj:25) at java_time.defconversion$combinations.invoke(defconversion.clj:24) at java_time.defconversion$conversionBANG.invokeStatic(defconversion.clj:43) at java_time.defconversion$conversionBANG.invoke(defconversion.clj:39) at java_time.defconversion$conversionBANG.invokeStatic(defconversion.clj:40) at java_time.defconversion$conversionBANG.invoke(defconversion.clj:39) at java_time.temporal__init.load(Unknown Source) at java_time.temporalinit.(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2204)
at clojure.lang.RT.classForName(RT.java:2213)
at clojure.lang.RT.loadClassForName(RT.java:2232)
at clojure.lang.RT.load(RT.java:450)
at clojure.lang.RT.load(RT.java:426)
at clojure.core$load$fn6548.invoke(core.clj:6046)
at clojure.core$load.invokeStatic(core.clj:6045)
at clojure.core$load.doInvoke(core.clj:6029)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5848)
at clojure.core$load_one.invoke(core.clj:5843)
at clojure.core$load_lib$fn__6493.invoke(core.clj:5888)
at clojure.core$load_lib.invokeStatic(core.clj:5887)
at clojure.core$load_lib.doInvoke(core.clj:5868)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$load_libs.invokeStatic(core.clj:5929)
at clojure.core$load_libs.doInvoke(core.clj:5909)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$require.invokeStatic(core.clj:5947)
at clojure.core$require.doInvoke(core.clj:5947)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at java_time$loading6721auto__14418.invoke(java_time.clj:1)
at java_timeinit.load(Unknown Source)
at java_timeinit.(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2204)
at clojure.lang.RT.classForName(RT.java:2213)
at clojure.lang.RT.loadClassForName(RT.java:2232)
at clojure.lang.RT.load(RT.java:450)
at clojure.lang.RT.load(RT.java:426)
at clojure.core$load$fn 6548.invoke(core.clj:6046)
at clojure.core$load.invokeStatic(core.clj:6045)
at clojure.core$load.doInvoke(core.clj:6029)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5848)
at clojure.core$load_one.invoke(core.clj:5843)
at clojure.core$load_lib$fn6493.invoke(core.clj:5888)
at clojure.core$load_lib.invokeStatic(core.clj:5887)
at clojure.core$load_lib.doInvoke(core.clj:5868)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$load_libs.invokeStatic(core.clj:5925)
at clojure.core$load_libs.doInvoke(core.clj:5909)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$require.invokeStatic(core.clj:5947)
at clojure.core$require.doInvoke(core.clj:5947)
at clojure.lang.RestFn.invoke(RestFn.java:930)
at cljplot.common$loading6721auto__14282.invoke(common.clj:1)
at cljplot.commoninit.load(Unknown Source)
at cljplot.commoninit.(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2204)
at clojure.lang.RT.classForName(RT.java:2213)
at clojure.lang.RT.loadClassForName(RT.java:2232)
at clojure.lang.RT.load(RT.java:450)
at clojure.lang.RT.load(RT.java:426)
at clojure.core$load$fn 6548.invoke(core.clj:6046)
at clojure.core$load.invokeStatic(core.clj:6045)
at clojure.core$load.doInvoke(core.clj:6029)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5848)
at clojure.core$load_one.invoke(core.clj:5843)
at clojure.core$load_lib$fn6493.invoke(core.clj:5888)
at clojure.core$load_lib.invokeStatic(core.clj:5887)
at clojure.core$load_lib.doInvoke(core.clj:5868)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$load_libs.invokeStatic(core.clj:5925)
at clojure.core$load_libs.doInvoke(core.clj:5909)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$require.invokeStatic(core.clj:5947)
at clojure.core$require.doInvoke(core.clj:5947)
at clojure.lang.RestFn.invoke(RestFn.java:1523)
at cljplot.core$loading6721auto__9797.invoke(core.clj:1)
at cljplot.coreinit.load(Unknown Source)
at cljplot.coreinit.(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2204)
at clojure.lang.RT.classForName(RT.java:2213)
at clojure.lang.RT.loadClassForName(RT.java:2232)
at clojure.lang.RT.load(RT.java:450)
at clojure.lang.RT.load(RT.java:426)
at clojure.core$load$fn6548.invoke(core.clj:6046)
at clojure.core$load.invokeStatic(core.clj:6045)
at clojure.core$load.doInvoke(core.clj:6029)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5848)
at clojure.core$load_one.invoke(core.clj:5843)
at clojure.core$load_lib$fn__6493.invoke(core.clj:5888)
at clojure.core$load_lib.invokeStatic(core.clj:5887)
at clojure.core$load_lib.doInvoke(core.clj:5868)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$load_libs.invokeStatic(core.clj:5925)
at clojure.core$load_libs.doInvoke(core.clj:5909)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$require.invokeStatic(core.clj:5947)
at clojure.core$require.doInvoke(core.clj:5947)
at clojure.lang.RestFn.invoke(RestFn.java:1289)
at ppdsp.masking.data_fitting$loading6721auto__9573.invoke(data_fitting.cljc:1)
at ppdsp.masking.data_fittinginit.load(Unknown Source)
at ppdsp.masking.data_fittinginit.(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2204)
at clojure.lang.RT.classForName(RT.java:2213)
at clojure.lang.RT.loadClassForName(RT.java:2232)
at clojure.lang.RT.load(RT.java:450)
at clojure.lang.RT.load(RT.java:426)
at clojure.core$load$fn 6548.invoke(core.clj:6046)
at clojure.core$load.invokeStatic(core.clj:6045)
at clojure.core$load.doInvoke(core.clj:6029)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5848)
at clojure.core$load_one.invoke(core.clj:5843)
at clojure.core$load_lib$fn6493.invoke(core.clj:5888)
at clojure.core$load_lib.invokeStatic(core.clj:5887)
at clojure.core$load_lib.doInvoke(core.clj:5868)
at clojure.lang.RestFn.applyTo(RestFn.java:142)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$load_libs.invokeStatic(core.clj:5925)
at clojure.core$load_libs.doInvoke(core.clj:5909)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:659)
at clojure.core$require.invokeStatic(core.clj:5947)
at clojure.core$require.doInvoke(core.clj:5947)
at clojure.lang.RestFn.invoke(RestFn.java:930)
at beaker_clojure_shell_5723778d_77a7_4224_a870_dd3f3dc5d4f4$eval1242.invokeStatic(Unknown Source)
at beaker_clojure_shell_5723778d_77a7_4224_a870_dd3f3dc5d4f4$eval1242.invoke(Unknown Source)
at clojure.lang.Compiler.eval(Compiler.java:7062)
at clojure.lang.Compiler.load(Compiler.java:7514)
at clojure.lang.Compiler.load(Compiler.java:7461)
at clojure.core$load_reader.invokeStatic(core.clj:4053)
at clojure.core$load_string.invokeStatic(core.clj:4055)
at clojure.core$load_string.invoke(core.clj:4055)
at beaker_clojure_shell_5723778d_77a7_4224_a870_dd3f3dc5d4f4$run_str_5723778d_77a7_4224_a870_dd3f3dc5d4f4.invokeStatic(Unknown Source)
at beaker_clojure_shell_5723778d_77a7_4224_a870_dd3f3dc5d4f4$run_str_5723778d_77a7_4224_a870_dd3f3dc5d4f4.invoke(Unknown Source)
at clojure.lang.Var.invoke(Var.java:381)
at com.twosigma.beakerx.clojure.evaluator.ClojureEvaluator.runCode(ClojureEvaluator.java:168)
at com.twosigma.beakerx.clojure.evaluator.ClojureCodeRunner.call(ClojureCodeRunner.java:47)
at com.twosigma.beakerx.clojure.evaluator.ClojureCodeRunner.call(ClojureCodeRunner.java:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:745)
Have someone faced a similar situation?