wasmerio / py2wasm

Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.
http://nuitka.net
Apache License 2.0
112 stars 4 forks source link

Pandas and OrTools #6

Open GregoryWullimann opened 4 months ago

GregoryWullimann commented 4 months ago

Hi!

I'm new to this kind of stuff so sorry if these are dumb questions.

I have a project that uses Pandas and OrTools (https://pypi.org/project/ortools/), I would like to convert it to WASM and use it on the web.

Is py2wasm the right tool for it?

Just by trying to run py2wasm on a simple file with import I run into issues.

Code:

import pandas as pd
df = pd.read_csv("my.csv", index_col = False)

py2wasm main.py -o main.wasm

py2wasm: Using wasi-sdk from /usr/local/lib/python3.11/site-packages/nuitka/wasi-sdk/21/sdk-Darwin Nuitka-Options: Used command line options: main.py --standalone --static-libpython=yes --disable-ccache --lto=yes Nuitka-Options: --output-dir=/usr/local/lib/python3.11/site-packages/nuitka/__py2wasm --output-filename=output.wasm --remove-output Nuitka: Starting Python compilation with Nuitka '2.6.3' on Python '3.11' commercial grade 'not installed'. FATAL: options-nanny: Error, package 'Foundation' requires '--macos-create-app-bundle' to be used or else it cannot work. Nuitka-Reports: Compilation crash report written to file 'nuitka-crash-report.xml'.

ayush3890 commented 2 months ago

@GregoryWullimann any success on this issue. I am facing similar issue with requests library