ethanhs/python-wasm

error happening when I try to install

Azaretdodo opened this issue · 14 comments

hello,

what happen when I try to install :

Capture d’écran de 2021-12-25 20-00-36

the command line who is happen the problem is the following :

shell
# get the Python sources
./fetch-python.sh
# build Python for the machine we are building on, needed before cross compiling for emscripten
./build-python-build.sh
# build Python cross-compiling to emscripten
./build-python-host-emscripten.sh

Thank you in advan,ce to help myself pass thoses errors,

Regards.

Azaretdodo.

Hi,

It looks to me like you don't have the emscripten toolchain installed or activated.

Id recommend looking at https://emscripten.org/docs/getting_started/downloads.html

If you've already installed emscripten you will probably need to activate it via the env.sh file in the installation location.

I went to install your ask,

now I fall on error following :
Capture d’écran de Capture d’écran de 2021-12-25 21-28-01 2021-12-25 21-27-56

Thank you in advance to help myself pass thoses error if they are big errors,

Regards.

Azaretdodo.

Hmm embuilder is supposed to be distributed with emscripten. Did you run the command to activate the environment? To test if it is working you should try running "emcc" if that is not found you need to activate the emscripten toolchain environment.

now I happen an error with your fork github :

> ./build-python-build.sh
> ./build-python-host-emscripten.sh
> ```
renaming build/scripts-3.11/pydoc3 to build/scripts-3.11/pydoc3.11
renaming build/scripts-3.11/idle3 to build/scripts-3.11/idle3.11
renaming build/scripts-3.11/2to3 to build/scripts-3.11/2to3-3.11
./build-python-host-emscripten.sh: ligne 8: embuilder : commande introuvable
./build-python-host-emscripten.sh: ligne 11: emconfigure : commande introuvable
./build-python-host-emscripten.sh: ligne 17: emmake : commande introuvable
-bash: /home/ubuntu/programs/python-wasm/cpython/builddir/build : est un dossier
root@ubuntu-ThinkPad-X250:/home/ubuntu/programs/python-wasm# 

Thank you in advance to help myself fully install your program,

Regards.

Azaretdodo.

@Azaretdodo it looks like you're trying to install emscripten from scratch instead of using the emsdk repo as suggested above and in the readme for this project. That could work, but to ask for help here I suggest following instructions exactly and using emsdk.

This looks something like

  $ git clone https://github.com/emscripten-core/emsdk.git
  $ cd emsdk
  $ ./emsdk install latest
  $ ./emsdk activate latest
  $ source ./emsdk_env.sh  # you'll need to run this one each time you open a new terminal

@Azaretdodo What are your goals in building this project? Would downloading a build accomplish them?

If you run into more issues with building, feel free to email me at thomasballinger@gmail.com — I'm not one of the authors of this repo, but I did get a build working so we could compare notes.

It looks like it cannot find python.html, are you running python3 -m http.server from the same folder as python.html?

Under https://github.com/ethanhs/python-wasm#test-build-artifacts it gives instructions to download the built artifact wasm.zip. If you unzip this it will contain python.html and the other files you need to play with things.

If you just want to try using things, you can also just go to https://ethanhs.github.io/python-wasm/ and get the same experience :)

Let me know if you are still running into issues building things, but I am going to close this assuming you've been able to build things or the above link works for you for now :)