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
??
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}' " );
Have you tried if jmputils's jpip is able to do those?
I know that.It can't just do thatThanks!
import jmputils jmputils.jpip('install', 'selenium-wire')
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)
too difficult
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 )
Python Install Packages( "selenium-wire" );
Thanks!
OK