For the latest version of JMP Help, visit JMP.com/help.


Scripting Guide > Python > JSL-to-Python Interfaces > Install Python Packages using JSL
Publication date: 07/24/2024

Install Python Packages using JSL

Use the JSL function Python Install Packages('python_module') to install external packages. The following examples install the Pandas package for use in other scripts.

Names Default To Here( 1 );
 
Python Install Packages( 'pandas' );

Install multiple packages at once by delimiting the package names with a space.

Names Default To Here( 1 );
 
Python Install Packages( 'pyarrow pandas' );

Install Compiled Python Packages using the Command Line and jpip

Python packages that are pure Python scripts will have no trouble installing. However, some packages that need to compile source code to build a dynamic library may need to use the jpip wrapper to install correctly.

jpip, a pip wrapper script designed for JMP can be created with the JSL command Python Create JPIP CMD();.

The following example creates the jpip wrapper then installs the scikit-learn package from the command line.

1. Generate the customized jpip wrapper script with JSL or JMP’s Python Editor:

Python Create JPIP CMD();

A directory picker dialog opens to choose the destination directory for jpip.

2. Open a terminal or command prompt:

On Windows, use Command Prompt or PowerShell.

On macOS, use the Terminal.

3. Install scikit-learn using jpip:

jpip install --user --no-warn-script-location sklearn

The Python package scikit-learn can now be used in JMP’s Python environment.

Using pip to Install Troublesome Packages

For packages that still fail to install, you must install a Python 3.11.x environment, use pip to compile them, then use JMP’s jpip wrapper to install them.

1. Install a Python 3.11.x release from https://www.python.org/downloads/.

2. Open a terminal or command prompt:

On Windows, use Command Prompt or PowerShell.

On macOS, use the Terminal.

3. Navigate to the location of your Python installation.

4. Install the package using pip to compile the package locally:

pip install python_module

5. Navigate to the location of the jpip wrapper.

6. Install the package to the JMP Python environment:

jpip install --user python_module

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).