Hello!
Yes, sys.executable returns the path of jmp.exe instead of the Python executable which is actually located in the same directory (jmp_python.exe). But it is difficult to use it directly as some environment variables must be set before running pip.
What you could do would be to allow JMP to generate the jpip.bat file for you. This file sets all the environment variables needed in order to the pip module of JMP-Python to work properly.
Python Create JPIP CMD();
After generating the jpip.bat file (must be done only once, obviously), you can use it with additional arguments in a JSL script like this:
Run Program(Executable("cmd.exe"), Options({"/c", "\!"path/to/the/jpip.bat\!"", "install", "--no-index", "--find-links=\!"path/to/the/wheels\!"", "numpy", "pandas", "scipy"}), Read Function("text"));
Note the escaped quotation marks, your paths might contain spaces.
Alternatively, you can modify the jpip.file directly (2nd last row):
"C:\path\to\the\jmp_python.exe" -m pip install --no-index --find-links="path\to\the\wheels" numpy pandas scipy
Then you need to run the jpip.bat file only:
Run Program(Executable("cmd.exe"), Options({"/c", "\!"path/to/the/jpip.bat\!""}), Read Function("text"));