Hi, I’ve got a problem with Unreal Engine. I’m using Unreal version 4.17.2-1 on Arch Linux. I’m trying to package a game for HTML5, and it does not work. In Arch Linux, the python
command runs python 3. My error is:
UATHelper: Packaging (HTML5): UnrealBuildTool: File “/usr/lib/emscripten/tools/ctor_evaller.py”, line 250
UATHelper: Packaging (HTML5): UnrealBuildTool: except Exception, e:
UATHelper: Packaging (HTML5): UnrealBuildTool: ^
UATHelper: Packaging (HTML5): UnrealBuildTool: SyntaxError: invalid syntax
UATHelper: Packaging (HTML5): UnrealBuildTool: Traceback (most recent call last):
UATHelper: Packaging (HTML5): UnrealB
uildTool: File “/usr/lib/emscripten/emcc.py”, line 2611, in
UATHelper: Packaging (HTML5): UnrealBuildTool: run()
UATHelper: Packaging (HTML5): UnrealBuildTool: File “/usr/lib/emscripten/emcc.py”, line 1759, in run
UATHelper: Packaging (HTML5): UnrealBuildTool: shared.Building.eval_ctors(final, memfile)
UATHelper: Packaging (HTML5): UnrealBuildTool: File “/usr/lib/emscripten/tools/shared.py”, line 2121, in eval_ctors
UATHelper: Packaging (HTML5): UnrealBuildTool: subprocess.check_call([PYTHON, path_from_root(‘tools’, ‘ctor_evaller.py’), js_file, binary_file, str(Settings.TOTAL_MEMORY), str(Settings.TOTAL_STACK), str(Settings.GLOBAL_BASE), binaryen_bin, str(int(debug_info))])
UATHelper: Packaging (HTML5): UnrealBuildTool: File “/usr/lib/python2.7/subprocess.py”, line 186, in check_call
UATHelper: Packaging (HTML5): UnrealBuildTool: raise CalledProcessError(retcode, cmd)
UATHelper: Packaging (HTML5): UnrealBuildTool: subprocess.CalledProcessError: Command ‘[’/usr/bin/python’, ‘/usr/lib/emscripten/tools/ctor_evaller.py’, ‘/tmp/tmpDH6G0RtmpuXcUtB.jsfunc_56.js.jo.js.jo.js’, ‘/opt/unreal-engine/Engine/Binaries/HTML5/UE4Game-HTML5-Shipping.js.mem’, ‘16777216’, ‘5242880’, ‘8’, ‘’, ‘0’]’ returned non-zero exit status 1
except Exception, e:
is deprecated in python 3.
My question is: How do I edit the build script so that it uses the python2
command?