Comments (8)
Yep, sorry, it should land here. That's like
classpath.addPath("/path/to/file.jar")
from almond.
It does not work now
cmd2.sc:1: not found: value classpath
val res2 = classpath.addPath("/path/to/file.jar")
^
from almond.
interp.load.cp
is available. However it is not able to add a JAR from http URL.
from almond.
If you want to add a local jar to Jupyter Scala , follow the instructions :
- Create a jar file for your project work
- Find the path to the jar
- Go to Jupyter Scala cell and type all the instructions in a single cell or split them in different cells as per your convenience
import ammonite., ammonite.ops.
val path = java.nio.file.FileSystems.getDefault().getPath("/home/animesh/Bureau/lastest_n2s3/out/artifacts/root_jar/root.jar") // here inside the " " add your path, I have added mine for example
val x = ammonite.ops.Path(path)
interp.load.cp(x)
It works for me, please check for yourself.
from almond.
I created an sbt plug-in for exporting classpath for Ammonite and Jupyter Scala
https://github.com/ThoughtWorksInc/sbt-ammonite-classpath/
from almond.
If someone used @animeshsrivastava24 code above and encountered compilation failed error below.
just comment frist line βimport ammonite., ammonite.ops.β
Then it should work
from almond.
@key2Love Can you explain how are you getting the value of x without importing the libraries?
Did you read your error code of twice import?
from almond.
@animeshsrivastava24 I didn't import the libraries before, it seems that almond imports these libraries automatically. I test this by restarting the kernel, the console still reported twice report error.
from almond.
Related Issues (20)
- Almond from Maven Central? HOT 2
- 0.13.4 release not available? HOT 2
- Lots of output messages cause kernel to stuck HOT 1
- Create NotebookSparkSession error on windows HOT 4
- Create NotebookSparkSession on windows error Failed to connect to timeline server
- Add section in docs about custom Toree magics
- Almond on windows is not use spark config in spark-default and hadoop config in hadoop config dir
- Docker ivy command stalls with a mounted volume
- named imports cannot follow wildcard imports HOT 1
- Scala 2.13.8 Almond 0.13.14 issue
- version compatibility with almond-sh on windows when use spark HOT 1
- Almond 0.13.2: InterpreterToIOInterpreter Error for Scala mixin type parameter constraint HOT 1
- Could not find or load main class coursier.bootstrap.launcher.Launcher HOT 2
- Installing the Scala kernel in standalone mode can execute code 5X slower than normal mode!! HOT 1
- Getting sbt-coursier error when upgrading from sbt version 1.3.13 to 1.9.4
- Spark 3.1.2 failing to create SparkSession in Almond 0.14.0-RC12 HOT 1
- Pre-fetching jars in docker environment fails to populate classpath HOT 4
- Reexecuting a Scala 3.3.1 cell with circe imports fails with `an identifier expected, but 'export' found` HOT 4
- Failed to import spark HOT 3
- Installed version is not aligned with dependencies
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from almond.