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
0
votes
1 answer

How to import the 'PyPDF4' library in Pyodide?

"I'm trying to import the 'PyPDF4' library in Pyodide using micropip but it's giving me an error: ValueError: Can't find a pure Python 3 wheel for 'pypdf4'. Would anyone know what I'm doing wrong?" async function main() { let pyodide = await…
rafaelcb21
  • 12,422
  • 28
  • 62
  • 86
0
votes
0 answers

Pyodide: runPythonAsync exceptions show asyncio stacktrace instead of inner one

When running python using runPythonAsync, and there is an exception i get the stacktrace of asyncio call, instead of the original code stacktrace. How do I get access to the internal stacktrace instead of the asyncio Excpetion? Python…
Cesar
  • 4,418
  • 2
  • 31
  • 37
0
votes
1 answer

Pass dropdown menu selection to Pyodide

I am trying to pass the value selected by the user from the dropdown menu to the Python code in Pyodide. In the simplified example below, I am trying to: Read the user-selected input file Convert file contents to lowercase Append the user-selected…
Timur Shtatland
  • 12,024
  • 2
  • 30
  • 47
0
votes
1 answer

Executing Python via newer versions of Pyodide in React leads to an error

I am a React and Pyodide newbie. I am trying to get the following code to work in a way that I can utilize some OpenCV functionality. The code below works and I can use numpy, etc in the calculations. However, OpenCV is not available in Pyodide…
GaryK
  • 123
  • 1
  • 6
0
votes
0 answers

Is it possible to test Pyodide in Angular using Karma/Jasmine?

I am trying to write unit tests for an Angular web application. Please note I am very, very new to web development. One of the Services, ProcessorService uses pyodide to run python code. I want to check if that python code manipulates a data set…
AlexM
  • 1
  • 1
0
votes
3 answers

Plotting an Image from GitHub using pyscript and matplotlib

Using pyscript it's easy to load in raw data from GitHub, like in the intro tutorial where you read in a Pandas DataFrame like so: url = ( "https://raw.githubusercontent.com/Cheukting/pyscript-ice-cream/main/bj-products.csv" ) ice_data =…
0
votes
1 answer

How would I import z3 solver in pyodide

I am trying to recreate a python project that uses z3 solver, which is not very supported on JS (especially on html) I found that I could use pyodide for doing python code and make this project a lot easier. But pyodide doesn't seem to recognise z3…
0
votes
0 answers

Data validation fails when send to pyodide

The problem is the code is working but it does not verify. The sample below was the first iteration of the implementation of the code. below. That code operates accurately, but once I save the signature in Sqlite (base64 encoded) server and retrieve…
0
votes
2 answers

How to render a python panel component from react with pyodide?

I am trying to use an example from the panel documentation of how to display a panel component from python using pyodide, but from a react component, instead of from pure html. I have set up a minimal NextJS react app which can be cloned, and ran…
SomeRandomPhysicist
  • 1,531
  • 4
  • 19
  • 42
0
votes
1 answer

pyscript error with WordPress integration

Hi Goodies i have an issue in pyscript issue : when i paste the below pyscript code in my WordPress post as an html and press preview it just simply popups to dawnload the pyodide file instead of showing the hello world message in the code below.…
0
votes
0 answers

Pyodide with numba compiled .so library

I have a python library which has a numba AOT compile function into a .so file. I am trying to bundle this into a pyodide wheel. When I examine the wheel file, the .so file (or webasm version) is missing. First installed: mamba install…
Seraj Ahmad
  • 405
  • 6
  • 10
0
votes
2 answers

My pyscript is not loading whenever i run the live server it downloads the pyodide.tar

Its stuck here I tried Downloading the pyodide but is still gives error of
0
votes
0 answers

Calling Scipy special functions from Pyodide in Node.js

I have Node v18.13.0, I have run npm install -D "pyodide@>=0.21.0-alpha.2", and am running the following code (put it in a file called test.js and run node test.js): var {loadPyodide} = require("pyodide"); (async function main() { // setup …
Ahmed Fasih
  • 6,458
  • 7
  • 54
  • 95
0
votes
1 answer

PyScript (Pyodide + WASM + ...) in the browser connects to the SQL server through SQL driver failed

the same .py script run itself works successfully, but in html get error environment: open the live server on visual studio code to run .html
暫時時
  • 41
  • 4
0
votes
1 answer

PyScript: How to pass in authorization token to API and return contents?

I'm creating a website on a static server (Github Pages) and am trying to call the Spotify API to obtain my most recently played track. I think the issue I'm having is that I'm having trouble entering the authorization token This is the code I tried…