File tree Expand file tree Collapse file tree 5 files changed +9
-14
lines changed Expand file tree Collapse file tree 5 files changed +9
-14
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
- import micropip
22
-
23
- await micropip.install(['panel'])
24
-
25
22
import panel as pn
26
23
27
24
slider = pn.widgets.FloatSlider(start=0, end=10, name='Amplitude')
Original file line number Diff line number Diff line change 46
46
- bokeh
47
47
- numpy
48
48
- pandas
49
+ - panel==0.13.1a1
49
50
</ py-env >
50
51
51
52
< div class ="container-fluid d-flex flex-column vh-100 overflow-hidden " id ="container ">
74
75
</ div >
75
76
< py-script >
76
77
import asyncio
77
- import micropip
78
78
79
79
from io import StringIO
80
80
from js import fetch
81
81
82
- await micropip.install(['panel==0.13.1a1'])
83
-
84
82
import panel as pn
85
83
import param
86
84
import pandas as pd
Original file line number Diff line number Diff line change 47
47
- numpy
48
48
- pandas
49
49
- scikit-learn
50
+ - panel
51
+ - altair
50
52
</ py-env >
51
53
52
54
< div class ="container-fluid d-flex flex-column vh-100 overflow-hidden " id ="container ">
78
80
</ div >
79
81
< py-script >
80
82
import asyncio
81
- import micropip
82
83
83
84
from io import StringIO
84
85
from js import fetch
85
86
86
- await micropip.install(['panel', 'altair'])
87
-
88
87
import altair as alt
89
88
import panel as pn
90
89
import pandas as pd
Original file line number Diff line number Diff line change 43
43
- bokeh
44
44
- numpy
45
45
- pandas
46
+ - panel
46
47
</ py-env >
47
48
48
49
< div class ="container-fluid d-flex flex-column vh-100 overflow-hidden " id ="container ">
69
70
</ div >
70
71
< py-script >
71
72
import asyncio
72
- import micropip
73
-
74
- await micropip.install(['panel'])
75
73
76
74
import panel as pn
77
75
import numpy as np
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