File tree 2 files changed +5
-3
lines changed 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 13
13
< py-env >
14
14
- bokeh
15
15
- numpy
16
+ - panel
16
17
</ py-env >
17
18
< h1 > Panel Example</ h1 >
18
19
< div id ="myplot "> </ div >
19
20
< py-script >
20
21
import asyncio
21
22
import micropip
22
23
23
- await micropip.install(['panel'])
24
-
25
24
import panel as pn
26
25
27
26
slider = pn.widgets.FloatSlider(start=0, end=10, name='Amplitude')
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ let pyodide;
7
7
8
8
let additional_definitions = `
9
9
from js import document, setInterval, console
10
+ import micropip
10
11
import asyncio
11
12
import io, base64, sys
12
13
@@ -178,7 +179,9 @@ let loadInterpreter = async function(): Promise<any> {
178
179
}
179
180
180
181
let loadPackage = async function ( package_name : string [ ] | string , runtime : any ) : Promise < any > {
181
- await runtime . loadPackage ( package_name ) ;
182
+ let micropip = pyodide . globals . get ( 'micropip' ) ;
183
+ await micropip . install ( package_name )
184
+ micropip . destroy ( )
182
185
}
183
186
184
187
let loadFromFile = async function ( s : string , runtime : any ) : Promise < any > {
You can’t perform that action at this time.
0 commit comments