cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to use Accelerated Life Testing (ALT) to evaluate reliability. Register for June 5 webinar, 2pm US Eastern Time.

JMP Wish List

We want to hear your ideas for improving JMP. Share them here.
Choose Language Hide Translation Bar

Allow custom Python package directories by respecting PYTHONUSERBASE

What inspired this wish list request? I need to install Python packages in a custom directory on my machine (e.g., C:\lib_jmp_python) using the standard Windows PYTHONUSERBASE environment variable. Currently, if I run jmputils.jpip('install', 'package_name'), my system variable is completely ignored. The jmputils.py script hardcodes the installation paths by forcing its own site.USER_BASE and overwriting the subprocess environment. This makes it impossible to route packages to a custom local folder using standard Python OS variables; everything is forced into the default JMP AppData/ProgramData directories.

 

What is the improvement you would like to see? I would like jmputils.py to respect the system's PYTHONUSERBASE variable if it is defined by the user, and only fall back to the default JMP paths if it is not set. Specifically, in the jpip() function, a simple conditional check could be added:

if 'PYTHONUSERBASE' in os.environ:
    site.USER_BASE = os.environ['PYTHONUSERBASE']
elif site.USER_BASE is None:
    site.getuserbase()

The exact same logic should be applied to the create_jpip() function when generating the jpip.bat script, replacing the currently hardcoded set PYTHONUSERBASE=%APPDATA%\JMP\JMP\Python with a dynamic check.

 

Why is this idea important? This is highly valuable for users and IT administrators who need strict control over their Python environments. It allows users to route potentially large Python packages to specific drives or custom directories without breaking JMP's isolated environment. Ultimately, it aligns JMP's Python integration with standard Python behaviors, reducing friction and confusion for developers trying to manage their packages efficiently.