Closed vault-thirteen closed 7 months ago
If you need details, here are they.
After I used the above stated command, it added three (3) following records into my user-level PATH
environment variable:
D:\Temp\1\emsdk
D:\Temp\1\emsdk\node\16.20.0_64bit\bin
D:\Temp\1\emsdk\upstream\emscripten
For some reason, the Python's folder which is D:\Temp\1\emsdk\python\3.9.2-nuget_64bit
was not added by the tool.
I thought that the tool was very smart and saw that Python was already installed, but no.
My system did not have any stand-alone Python installation at that time.
So, this is a bug, 100%.
We deliberately don't add our internal version of python to the user's PATH, but instead set the EMSDK_PYTHON environment variable so that our launchers can use that to find our internal version of python.
The version of python we ship with emsdk is really designed as an implementation detail of emsdk and not designed to be used to other purposes. Is there some reason why you want/need it to be in your PATH?
No, there is no special reason for that. I can use an external Python. I just thought that it should be in PATH
since it was bundled.
Controversy in environment variables.
There is a controversy.
In this issue 1315 (https://github.com/emscripten-core/emsdk/issues/1315) you say that python (EMSDK_PYTHON) is used only for internal purposes and thus it is not added to PATH variable.
But at the same time nodejs (EMSDK_NODE) is used for the same internal purposes but it is actually added to PATH variable.
EMSDK = D:/Temp/1/emsdk
EMSDK_NODE = D:\Temp\1\emsdk\node\16.20.0_64bit\bin\node.exe
EMSDK_PYTHON = D:\Temp\1\emsdk\python\3.9.2-nuget_64bit\python.exe
JAVA_HOME = D:\Temp\1\emsdk\java\8.152_64bit
Clearing existing environment variable: EMSDK_PY
Adding directories to PATH:
PATH += D:\Temp\1\emsdk
PATH += D:\Temp\1\emsdk\node\16.20.0_64bit\bin
PATH += D:\Temp\1\emsdk\upstream\emscripten
There is a controversy. In this issue you say that python is used only for internal purposes and thus it is not added to PATH variable. But nodejs is used for the same internal purposes but it is actually added to PATH variable.
EMSDK = D:/Temp/1/emsdk EMSDK_NODE = D:\Temp\1\emsdk\node\16.20.0_64bit\bin\node.exe EMSDK_PYTHON = D:\Temp\1\emsdk\python\3.9.2-nuget_64bit\python.exe JAVA_HOME = D:\Temp\1\emsdk\java\8.152_64bit Clearing existing environment variable: EMSDK_PY
Adding directories to PATH: PATH += D:\Temp\1\emsdk PATH += D:\Temp\1\emsdk\node\16.20.0_64bit\bin PATH += D:\Temp\1\emsdk\upstream\emscripten
The situation with node is a little more completed. Historically we always added it to the PATH so that folk could run the output of emcc (e.g. for running test) so there is at least some need to node that is not internal. However a lot of foks were getting confused because we were clobber their existing version of node in their PATH.
As a compromise we settled on a solution where node is added, but only if it doesn't already exist in the users PATH: #1189. i.e. if you install your own version of node emsdk will stop adding node to your path.
As stated in the title, the
emsdk activate latest --permanent
command does not add Python's executable to thePATH
environment variable.