Questions tagged [pyodide]

Please prefer using tags for the contained packages with questions which are more specifically related to them. Pyodide brings the Python 3.8 runtime to the browser via WebAssembly, along with the Python scientific stack including NumPy, Pandas, Matplotlib, parts of SciPy, and NetworkX.

Pyodide brings the Python 3.8 runtime to the browser via WebAssembly, along with the Python scientific stack including NumPy, Pandas, Matplotlib, parts of SciPy, and NetworkX.

Home (and source of above quote):
https://github.com/iodide-project/pyodide

110 questions
2
votes
0 answers

Pyodide - Python async unit tests

I'm trying to implement async unit tests running with usage of pyodide library. Synchronous tests work just fine, I have a problem with async tests. I created a class definition where I'm placing all tests something like from unittest import…
whiteBear22
  • 377
  • 2
  • 8
  • 21
2
votes
0 answers

How to build pyodide?

During the build of pyodide using the using make method described in the documentation. I am coming across the following error during the emsdk step. Please direct me towards a solution for building the core packages in pyodide…
2
votes
0 answers

Strugging to buid a cython based extensions for pyodide

Strange. I built a wheel with a cython extension using the instructions here. But when I try to load in dist/console.html I get "module not found". It's particularly strange since on my first try I got "no module named numpy" (yes, my module does…
sspickle
  • 23
  • 3
2
votes
1 answer

No module named 'theblockchainapi' in pyscript

I have wirtten some lines in python and want to integrate them into my website. As soon as I want to use them I recieve an error-message stating that the module can't be found: JsException(PythonError: Traceback (most recent call last): File…
24Doggi
  • 59
  • 3
2
votes
1 answer

Pyodide unable to read xlsx files into pandas

I'm trying to load xlsx files using pyodide. I able to load xls files correctly using the following code: response = await fetch('${fileUrl}') js_buffer = await response.arrayBuffer() dFrame = pd.read_excel(BytesIO(js_buffer.to_py())) However, it…
ste_kwr
  • 820
  • 1
  • 5
  • 21
2
votes
0 answers

Running Python 3 Turtle programs in the browser

I need to run some Python 3 programs that use Turtle Graphics. I was trying to display these on the browser. I found 2 options skulpt (https://skulpt.org). This does not seem to support Python 3 fully. pyodide. This uses Python 3 but does not seem…
sudhir shakya
  • 827
  • 1
  • 9
  • 21
2
votes
1 answer

Pyodide languagePluginLoader is not defined

I have been using Pyodide to run some python in my website. It has been working up until recently, however now has begin giving this error, Uncaught ReferenceError: languagePluginLoader is not defined at 2347:162 Some searching has revealed that…
deMangler
  • 427
  • 3
  • 14
2
votes
0 answers

Build pyodide on windows WSL2

Trying to build pyodide on windows WSL2. I have already created a conda environment with the required python version. But I'm still constantly getting the following error: wasm-ld: error: unknown argument: --sysroot=/ em++: error:…
Psidom
  • 209,562
  • 33
  • 339
  • 356
2
votes
0 answers

Quadratic programming in Pyodide

I would like to know if there is any library, which I can use in Pyodide and which has a function, similar to "quadprog" in Matlab or multiple external libraries in Python (McGibbon's quadprog, CVXOPT etc.) doing quadratic optimization over convex…
DIgg
  • 51
  • 2
2
votes
1 answer

Pyodide Plotly out of memory, memory access out of bounds

I've faced some interesting issue. The problem is when I run the code snippet with pyodide and console is opened it works properly: import pandas import plotly.express as px df = px.data.iris() fig = px.scatter( df, x="sepal_width",…
Alexandre Adereyko
  • 438
  • 2
  • 4
  • 12
2
votes
0 answers

How to print result of Pyodide in another webpage instead of in console?

I am using Pyodide to compile python code in the browser. The code below is used to execute the python code in editor and display the result in console. For the errors, I am displaying it using alert() as shown below, and it works just fine. Now, I…
2
votes
1 answer

Executing Python via Pyodide in Github Pages

Is there any way I can run python in github pages? Specifically through Pyodide because I am using pandas. I know github pages is only meant to serve static pages using HTML/CSS/JS but I was wondering if there is a workaround with pyodide given that…
rmd_po
  • 381
  • 1
  • 4
  • 12
2
votes
1 answer

How to get all pyodide globals in JavaScript

According to the api docs, pyodide provides a way to get a user defined function or variable through pyodide.globals.x as an example (where x is defined by the user). I want to be able to get all globals at once but there is nothing in the docs…
2
votes
1 answer

How to access a property of App() globally (in React App, from pyodide)

I have implemented pyodide in a React App like so. In src/App.js in the example from the link above, let's say I have someProperty in App() that I want to access from script.py. const App = () => { const [output, setOutput] =…
Miss Swiss
  • 89
  • 1
  • 9
2
votes
1 answer

Modify variable values in bdb without ctypes

I have a class extending bdb.Bbd that I use for analyzing Python 3 code. Now, I need to also modify some of the variable values as it steps through the program. Outside of functions, I can do this by just modifying the frame.f_locals…
Kasra Ferdowsi
  • 574
  • 5
  • 16