spylon-kernel icon indicating copy to clipboard operation
spylon-kernel copied to clipboard

Not able of import external packages

Open dgcdevelopment opened this issue 5 years ago • 6 comments
trafficstars

I am trying to execute flink in spylon, for that I execute this code in the cell.

%%init_spark launcher.packages = ["org.apache.flink:flink-scala_2.11:1.9.1", "org.apache.flink:flink-streaming-scala_2.11:1.9.1", "org.apache.flink:flink-connector-kafka_2.11:1.9.1", "org.apache.flink:flink-avro:1.9.1", "org.apache.flink:flink-jdbc_2.11:1.9.1", "org.apache.flink:flink-metrics-prometheus_2.11:1.9.1"]

launcher.jars = ["file:///C:/Users/david/.ivy2/jars/org.apache.flink_flink-scala_2.11-1.9.1.jar"] launcher.master = "local[4]" launcher.conf.spark.executor.cores = 8

launcher.conf.spark.app.name = "MyApp"

then I start sparkcontext, and try to import flink import org.apache.flink

But I get this error:

image

In the spark UI it looks like they are installed

image

Also the packages look like they are downloaded, with launcher.packages

image

Would anbody know how to make this work?

Thank you very much!!!

dgcdevelopment avatar Feb 17 '20 19:02 dgcdevelopment

my version of scala image

dgcdevelopment avatar Feb 17 '20 20:02 dgcdevelopment

on top of that if I run from cmd line it seems to work image

dgcdevelopment avatar Feb 17 '20 20:02 dgcdevelopment

@darkaero-xx I think the biggest short comming of spylon-kernel is that it is based on the Spark kernel, which is a fork of the Scala default REPL. That is at least what I found in this great article by Sören Brunk)

Alternatively you can use almond

JWDobken avatar Jun 10 '20 10:06 JWDobken

I am having the same issue. did you manage to fix your problem? @darkaero-xx

EDIT: I managed to fix my issue by mounting the jars in a volume in another folder (/temporary/ instead of /home/jovyan/ ) (I am using the docker image)

damienlancry avatar Sep 30 '20 02:09 damienlancry

I don't know why it does not work Screen Shot 2022-04-01 at 9 46 24 AM

Could you please provide more details? or any advice? Screen Shot 2022-04-01 at 9 46 43 AM

arron-rgb avatar Apr 01 '22 13:04 arron-rgb

Restarting the kernel fixed it for me

Click on Kernal > Restart

swayam18 avatar Jun 10 '22 13:06 swayam18