python not recognized
I have just recently installed emscripten and I had went through the tutorial, updated whatever is needed. I got to specified folder to test emcc -v and I get 'python' is not recognized as an internal or external command,
operable program or batch file.
I am lost on how to resolve this problem.
Here is what I put to be more clear. Let me know what I did wrong.
C:\Users\owner\Desktop\Emscript\emscripten\1.37.22>emcc -v
'python' is not recognized as an internal or external command,
operable program or batch file.
Python (2.6 or later) needs to be installed, and added to the path, so that the windows shell environment can find it.
Did you install using the emsdk? It should handle that automatically. If you installed manually, then you may need to install python manually as well.
@ALImmortal you probably forgot to call > emsdk activate latest
I just tried this install install instructions described here: Download and install The python unrecognized is thrown by the >emsdk activate latest command. It looks like the default installations for Python 2.7.12 though Python 3.6.0, by default, set the Windows shell command to "py" instead of "python".
Running into the same thing, but it worked when I ran it through GIT BASH
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.
Still relevant when trying to run emscripten from git bash. The 'python' command works though, and is the right version
Can you try running with bash -x $(which emcc) and and post the output here?
Sure.
$ bash -x $(which emcc)
+ unset _PYTHON_SYSCONFIGDATA_NAME
+ '[' -z '' ']'
+ PYTHON=
+ '[' -z '' ']'
++ command -v python3
+ PYTHON=/c/Users/Miika/AppData/Local/Microsoft/WindowsApps/python3
+ '[' -z /c/Users/Miika/AppData/Local/Microsoft/WindowsApps/python3 ']'
+ '[' -z /c/Users/Miika/AppData/Local/Microsoft/WindowsApps/python3 ']'
+ '[' -z '' ']'
+ exec /c/Users/Miika/AppData/Local/Microsoft/WindowsApps/python3 -E /c/Users/Miika/Downloads/emsdk/upstream/emscripten/emcc.py
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
Btw, fixed the issue by adding export EMSDK_PYTHON="$(which python)" to ~/.bash_profile
So it looks like MS has installed some kind of python3 launcher/shim in /c/Users/Miika/AppData/Local/Microsoft/WindowsApps/python3 but it is non-functional?
export EMSDK_PYTHON="$(which python)" will only work if python happens to be python version 3.. which i seems like in your case it is? What does which python show BTW? Is it a version of python that comes with you git bash shell? Or a windows version of python?