cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
lala
Level VIII

Is there a list of python library names in JMP18.0.0?

I know it is possible to see a list of installed python libraries for JMP

jmputils.jpip('list')


But I would like to know the list of uninstalled python libraries that JMP software already includes
For example I want JMP python to copy the result to the paste board and whether it wants to be installed 

 

it can't

jmputils.jpip('install','pyperclip')

 

Thanks Experts!

13 REPLIES 13
jthi
Super User

Re: Is there a list of python library names in JMP18.0.0?

What do you mean by uninstalled python libraries?

-Jarmo
lala
Level VIII

Re: Is there a list of python library names in JMP18.0.0?

2024-07-27_7-27-55.png

Re: Is there a list of python library names in JMP18.0.0?

The only 'installed' libraries are the standard libraries distributed with a stock Python.org Python 3.11.x minus a select few that may not play well within the embedded environment.  These most notably: venv, and tkinter.  And a few trivial ones like turtle and hello.

 

Everything shipped with JMP is 'installed'.  Any third party packages outside of the Python.org standard library need to be installed by the user.

 

When you run the jpip install, what messages do you get from the log?  On my Mac laptop everything installed just fine as show by the log output below.  After which import pyperclip ran successfully.

 

import jmp 
from jmputils import jpip

jpip('install','pyperclip')
/*:

Collecting pyperclip
  Downloading pyperclip-1.9.0.tar.gz (20 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: pyperclip
  Building wheel for pyperclip (setup.py): started
  Building wheel for pyperclip (setup.py): finished with status 'done'
  Created wheel for pyperclip: filename=pyperclip-1.9.0-py3-none-any.whl size=11002 sha256=5a1a6570a19613698944bc6999196a2ea39ec392db7f72942179f5538f1debc9
  Stored in directory: /Users/_my_user_id_/Library/Caches/pip/wheels/e8/e7/56/591cb88ba1783b38c40d584026e766aac9c3a048e34128ce8b
Successfully built pyperclip
Installing collected packages: pyperclip
Successfully installed pyperclip-1.9.0

The jmputils.jpip() is strictly a wrapper around Python's pip routine.  We are not running any curated library of packages.  I would check the log messages for network connection issues, permission issues, or build issues.  If a package actually needs compilation, you also have to have a build environment on your machine such as Visual Studio or Xcode.

 

 

 

lala
Level VIII

Re: Is there a list of python library names in JMP18.0.0?

Thanks Experts!

win10

2024-07-26_7-03-46.png2024-07-26_7-04-03.png

Re: Is there a list of python library names in JMP18.0.0?

The _socket error is Windows specific and due to a wrong assumption I made regarding the layout of the files installed.  It is Windows specific and is fixed in 18.1.  While the embedded Python environment finds the _socket.pyd file just fine where it is located, the setuptools process assumes that the .pyd files will be found within a DLLs/ directory.  

 

In 18.1,  I have created a DLLs subdirectoy, and moved the .pyd files and 4 Python specific DLLs from the JMP.exe directory to the DLLs/ directory.  Those 4 dlls being libcrypto-3.dll, libffi-9.dll, libssl-3.dll and sqlite3.dll. 

 

The workaround to try for 18.0, 18.0.1 is to shutdown JMP, create the DLLs/ subdirectory in the directory that contains JMP.exe, then move the .pyd files and the 4 aforementioned dlls into the DLLs subdirectory.  ( and of course restart JMP afterwards ).

 

Assuming JMP is installed in c:\Program Files\JMP\JMP\18

 

Exit JMP

make the directory c:\Program Files\JMP\JMP\18\DLLs

Move *.pyd to c:\Program Files\JMP\JMP\18\DLLs

Move libcrypto-3.dll, libffi-9.dll, libssl-3.dll and sqlite3.dll to c:\Program Files\JMP\JMP\18\DLLs

Restart JMP

 

That should fix the issue.  And JMP Python Integration finds the pyd files just fine located within the DLLs directory.

lala
Level VIII

Re: Is there a list of python library names in JMP18.0.0?

OK、Thanks Experts!

libffi-8.dll

2024-07-26_22-59-22.png

lala
Level VIII

Re: Is there a list of python library names in JMP18.0.0?

In addition, I want to know whether JMP and python can access each other in memory data in JMP 18:

The details are:
1. First, JMP opens the data table in JMP format
2, call python through JSL, so that python can directly read the relevant data of the JMP file that has been opened for calculation
3, because python is basically based on the memory array to calculate, so the python calculation result should be in the memory array, then JSL can directly read the result in the memory array
4, or whether python can directly add the result of its calculation in the JMP file operation to add the result of the calculation column, or python through the paste board to pass the calculation result to JSL.

 

This eliminates the need to output the CSV file, wait for python to save the result to the CSV file, and then read the new CSV file by JSL.
If the amount of data is large, output and saving are also time-consuming.
Of course, this is just my idea and may be impractical.I have no programming background and use simple JSL.

 

Thanks Experts!

lala
Level VIII

Re: Is there a list of python library names in JMP18.0.0?

  • My original method was this

dt=Open("$SAMPLE_DATA/Current Stock Averages.jmp");
try(dt<<delete columns(6));try(dt<<Delete Table Property("Source"));dt<<Save("C:\1\Ave.csv");
Close(dt,nosave);Wait(2);
Python Submit File("C:\1\ZIG0.py");

 to calculate this ZIG indicator, GPT-4o can also provide python code that can be run in JMP

which I save as C:\1\ZIG0.py.

 

  • See attachment for this py、Thanks!

 

lala
Level VIII

Re: Is there a list of python library names in JMP18.0.0?

How can I use JSL to call python and calculate zig's results directly in the table of Current Stock Averages.jmp that is already open?

 

Thanks Experts!