How do I add python to my HTML,JS,CSS repl

i am trying to make my website run a Python script file but I can’t find a way to install Python to the repl, how do I do this?
i have tried typing “python” into the shell and telling it to install it but then it puts me in some weird console here and then i press “CTRL+D” to exit the weird shell then type “python” and it asks me if i want to install it again.

I would recommend just making a flask repl, as HTML/CSS/JS repls are different from most other repls.


You can use the Pyscript library to add code in python in your .html files. You can check more about it as their website here


I found some code on the pyodide webiste (, I have never had pyodide work but I have heard good things about it:

      <script src=""></script>
    <script type="text/javascript">
      async function main(){
        let pyodide = await loadPyodide();
        console.log(pyodide.runPython("1 + 2"));

I hope it helps.

1 Like

I think you can do , but I haven’t tested it.

Look here: