Search Unity

WebGL builds - Unity assumes that python is python2

Discussion in 'Linux' started by spacepluk, Sep 17, 2015.

  1. spacepluk

    spacepluk

    Joined:
    Aug 26, 2015
    Posts:
    243
    When exporting to WebGL, it looks like the editor tries to execute `python /opt/Unity/Editor/Data/PlaybackEngines/WebGLSupport/BuildTools/Emscripten/emcc`. This works well as long as the python in the path is actually python2, but this is not the case in Arch Linux where the default is python3 and it ends up failing with syntax errors.

    Looking at the shebang in `emcc` it looks like it should work just fine by executing the script directly. I know that at least Debian has python2 in the PATH (python-minimal) but I'm not sure about Ubuntu.

    Anyway, for the time being I'm just patching the AUR package to add a python symlink to the Unity directory and prepending that to the PATH in the launch script, so that it ends up executing the correct version of python. But I figured I would let you know just in case you want to do something about it.
     
  2. fjalla

    fjalla

    Joined:
    Nov 6, 2012
    Posts:
    73
    THAT'S why. Now your patch makes sense, hehe.
     
    spacepluk likes this.
  3. Rouddem

    Rouddem

    Joined:
    Dec 15, 2015
    Posts:
    14
    Still an issue in 2020.1.17f1 :(