You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
</code></pre></div></td></tr></table></div></div></div></div></details><h2id=pyscript-setup>PyScript Setup<aclass=headerlinkhref=#pyscript-setuptitle="Permanent link">¶</a></h2><p>This template tag configures the current page to be able to run <code>pyscript</code>.</p><p>You can optionally use this tag to configure the current PyScript environment. For example, you can include a list of Python packages to automatically install within the PyScript environment.</p><divclass="tabbed-set tabbed-alternate" data-tabs=16:1><inputchecked=checkedid=__tabbed_16_1name=__tabbed_16type=radio><divclass=tabbed-labels><labelfor=__tabbed_16_1>my_template.html</label></div><divclass=tabbed-content><divclass=tabbed-block><divclass=highlight><tableclass=highlighttable><tr><tdclass=linenos><divclass=linenodiv><pre><span></span><spanclass=normal>1</span>
318
+
</code></pre></div></td></tr></table></div></div></div></div></details><h2id=pyscript-setup>PyScript Setup<aclass=headerlinkhref=#pyscript-setuptitle="Permanent link">¶</a></h2><p>This template tag configures the current page to be able to run <code>pyscript</code>.</p><p>You can optionally use this tag to configure the current PyScript environment, such as adding dependencies.</p><divclass="tabbed-set tabbed-alternate" data-tabs=16:1><inputchecked=checkedid=__tabbed_16_1name=__tabbed_16type=radio><divclass=tabbed-labels><labelfor=__tabbed_16_1>my_template.html</label></div><divclass=tabbed-content><divclass=tabbed-block><divclass=highlight><tableclass=highlighttable><tr><tdclass=linenos><divclass=linenodiv><pre><span></span><spanclass=normal>1</span>
</code></pre></div></td></tr></table></div></div></div></div></details><detailsclass=question><summary>Can I use a local interpreter for PyScript?</summary><p>Yes, you can set up a local interpreter by following PyScript's <ahref=https://docs.pyscript.net/latest/user-guide/offline/#local-pyodide-packages>standard documentation</a>.</p><p>To summarize,</p><ol><li>Download the latest Pyodide bundle from the <ahref=https://github.com/pyodide/pyodide/releases>Pyodide GitHub releases page</a> (for example <code>pyodide-0.26.3.tar.bz2</code>).</li><li>Extract the contents of the bundle to your project's static files.</li><li><p>Configure your <codeclass=highlight><spanclass=cp>{%</span><spanclass=k>pyscript_setup</span><spanclass=cp>%}</span></code> template tag to use <code>pyodide</code> as an interpreter.</p><divclass=highlight><pre><span></span><code><spanclass=cp>{%</span><spanclass=k>pyscript_setup</span><spanclass=nv>config</span><spanclass=o>=</span><spanclass=s1>'{"interpreter":"/static/pyodide/pyodide.mjs"}'</span><spanclass=cp>%}</span>
0 commit comments