Python 3.9 error with WebGL build

Hello,

I have found a interesting bug with python 3.9 and building WebGL projects in Unity (2020.3.xx). The problem I had was during the IL2cpp compiling portion of the build-out and it would throw an error in C:*PATH_TO_PYTHON_3.9 \setup.py* I do not have the error logs anymore but every build would stop at the “IL2cpp” portion.

The fix I had to do was take off the %PYTHONHOME% system environment variable and the build out would succeed. Also note I have tried this with previous versions of Unity and with empty projects so it could not be possible for plug ins to interfere. Is this a known issue in the Unity Editor? Surely there has to be another fix then deleting environment variables.

this is my first time hearing of this error in Python, did you fix it completely?
cookie clicker

This is something that can happen on a windows machine when you’re trying to launch python from venv. I’ve encountered something similar long time ago, and basically back then the conclusion was that venvs aren’t properly implemented and that’s why docker is popular. Things could’ve changed since.

1 Like