Trying to imposrt skia_canvas in jupyter with deno kernel fails

50 Views Asked by At

I'm trying out the Deno Jupyter kernel integration. My specific goal is to use D3 to plot some data in a Jupyter notebook.

My setup is:

The code fails at :

import {
  createCanvas,
  Image,
  Path2D,
} from "https://deno.land/x/skia_canvas/mod.ts";

With:

Stack trace:
TypeError: Deno.dlopen is not a function
    at dlopen (https://deno.land/x/[email protected]/mod.ts:145:15)
    at eventLoopTick (ext:core/01_core.js:153:7)
    at async https://deno.land/x/[email protected]/src/ffi.ts:966:10

On the skia_canvas repo (https://github.com/DjDeveloperr/skia_canvas) I see they note that their package relies on unstable FFI Api and requires specific run command parameters.

deno run --allow-ffi --allow-env --unstable <file>
# or just
deno run -A --unstable <file>

However, I am running this in Jupyter so this is not an option I am aware off.

Does anyone have an idea how I can workaround this issue ?

0

There are 0 best solutions below