How can the following python library installation commands be implemented in python in a JMP environment?Thanks Experts!
pip install selenium-wire -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install blinker==1.7.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip uninstall h11
pip install h11 -i https://pypi.tuna.tsinghua.edu.cn/simple
Automation and ScriptingWindowsRe: How can the following python library installation commands be implemented in python in a JMP environment?Thanks!
OK

Re: How can the following python library installation commands be implemented in python in a JMP environment?Python Install Packages( "selenium-wire" );
Re: How can the following python library installation commands be implemented in python in a JMP environment?A couple comments about the code above.
Python Init(); is unnecessary in JMP 18 and beyond. Python is live with the first JSL Python statement run or the first script run from a Python script editor.
Second, for a multi-line string passed to Python Submit you can't just quote the string. In JSL there are special characters that flag a string to be represented as a whole.
Python Submit (
"\[
import blah
# my python code here
]\");
Just search for Python Submit in JMP's Scripting Index to see an example. ( Under Help menu. Help -> Scripting Index )
Re: How can the following python library installation commands be implemented in python in a JMP environment?Have you tried dropping the --upgrade? Or moving it before -i (though I think it might be able to figure it out).


pip install - pip documentation v24.3.1
Re: How can the following python library installation commands be implemented in python in a JMP environment?too difficult

Re: How can the following python library installation commands be implemented in python in a JMP environment?Have you tried with the extra commands? The first argument in jpip should allow you to use something like
'install -i https://pypi.tuna.tsinghua.edu.cn/simple'
inside it (scripting index has example of using install --upgrade)
Re: How can the following python library installation commands be implemented in python in a JMP environment?I know that.
It can't just do that
Thanks!
import jmputils
jmputils.jpip('install', 'selenium-wire')Re: How can the following python library installation commands be implemented in python in a JMP environment?Have you tried if jmputils's jpip is able to do those?

Re: How can the following python library installation commands be implemented in python in a JMP environment???
Python Init();
Python Submit(
"
import subprocess
try:
subprocess.check_call(['pip', 'install', 'selenium-wire', '-i', 'https://pypi.tuna.tsinghua.edu.cn/simple'])
result = 'selenium-wire 安装成功。'
except Exception as e:
result = f'安装失败:{e}'
"
);