Failed to run Media soup rust example on Windows 10

I git cloned mediasoup onto my local machine (Windows 10) and ran

 `cargo run --example videoroom`

Which is giving me this error:

process didn’t exit successfully: C:\Users\Yassin\Desktop\buh\rust_projects\mediasoup\target\debug\build\mediasoup-sys-4321a4d0483106e1\build-script-build (exit code: 101)
— stderr
thread ‘main’ panicked at ‘Failed to start: Error { kind: NotFound, message: “program not found” }’, worker\build.rs:131:10
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Python version: 3.12.3
pip version: pip 24.0 from C:\Users\Yassin\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip (python 3.12)

I read on the documentation that I should disable all execution aliases and done that, restarted my pc, and am still getting the same error

Please halp

Hello,
I had the same problem.
Upon looking the build.rs script it uses either the “PYTHON” environment variable or “python3” for executing python.
You can open a new terminal and check if python3 is a valid command or not.
In my case it opened up the microsoft store to install it from there, even though I already had a valid Python installation that I run with python

So your solutions are the following, either:

  • Change the build.rs script to execute python instead of python3
  • Install Python from the Microsoft store
  • Set a PYTHON environment variable to point to your Python interpreter executable

Hi,
This has gotten the rust server-side example to work,
However, I am now trying to do an npm install for the html example, and am running into an error again,

I’m not sure exactly what the problem is, as I’ve tried removing the quotes from “python3”, as well as changing the words to just “python”

Thanks again,
Yassin

have you tried running npm install from a standalone powershell terminal instead of one integrated in a code editor ?

I’m not sure what you mean from an integrated code editor, but that was using git bash terminal,

I opened a powershell terminal to try it out anyway, and seem to get the same issue

Okay I thought it was the integrated terminal in vscode, i’ve already had a similar issue when using it.
Anyway the pty module seems to not be supported on windows but I didn’t run into this issue on my windows machine. Do you have linux subsystem installed ? Maybe this could fix the issue but i’m not certain

No I do not sorry, but I yes this does work properly in my Linux environment :frowning:

Sorry if my previous answer was unclear
Maybe you can try to install WSL2 on your windows system to fix the issue:

But again i’m not sure this will fix the issue

There was some added support to make Windows machine work with some prerequisites installed but unsure if rust version complies yet or what’s up there.