cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Feli
Level IV

Installing python packages in JMP 19

I was following the instructions in the online help to install python packages (pandas, numpy, ...) that I need for my scripts, but I am having trouble.

Feli_0-1762265297238.png

When I run 

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

(I needed to change to "" for it to work), I'm getting the error:

import jmputils
jmputils.jpip('install', 'pandas')
/*:
ERROR: Can not perform a '--user' install. User site-packages are disabled for this Python.

 

My guess is that the issue is that I would need admin rights to write to the windows folder where JMP sits, but I can't find anything in the help on how to solve this issue.

15 REPLIES 15
hogi
Level XIII

Re: Installing python packages in JMP 19

JMP/Python can be found in 
C:\Users\__username___\AppData\Roaming\JMP\JMP\Python\Python313

jthi
Super User

Re: Installing python packages in JMP 19

Have you tried installing from Python Script Editor?

import jmp

from jmputils import jpip
# update to latest version of pip and setuptools then install numpy & pandas
jpip('install', 'pandas')
-Jarmo
Feli
Level IV

Re: Installing python packages in JMP 19

That was my first try, but gives the same error:

ERROR: Can not perform a '--user' install. User site-packages are disabled for this Python.

jthi
Super User

Re: Installing python packages in JMP 19

Some sort of issue related to this seems to be known, but not really sure if the "solution" is helpful (close and re-open JMP),  Scripting Guide > Python > Install a Python Package > Avoiding Errors with Previously Installed Pac... . 

Last option that comes to my mind is to use command line with Python Create JPIP CMD(); or jmputils.create_jpip, Scripting Guide > Python > JSL-to-Python Interfaces > Install Python Packages using JSL .

 

@Paul_Nelson 

-Jarmo
Feli
Level IV

Re: Installing python packages in JMP 19

Your first suggestions seems to match what might be happening to me: pandas and numpy have been installed before on my JMP 18 installation on the same system. Maybe that is what is clashing now.
I think I will have to open a support case with JMP to get to the botton of this.

Thanks for all your help!

Re: Installing python packages in JMP 19

There should be no conflict between JMP18's Python and JMP 19 Python site-packages.  Python itself creates a Python versioned subdirectory.  C:\Users\<User>\AppData\Roaming\JMP\JMP\Python\Python313 for JMP 19,  ...\Python311 for JMP 18. 

Feli
Level IV

Re: Installing python packages in JMP 19

That could be a hint. I don't have such folders in my User folder, but it seems that such a Python folder is rather in my C:\Programs\JMP\... .  Since I have no write rights into this folder, that might cause this error. What I am not sure about is why a) this worked for JMP 18 before (where I could initialize pandas and co) and the folders are the same (no User folder, Python sitting in the programs folder) and b) why it was installed there.

Re: Installing python packages in JMP 19

This python script updates jpip and installs pandas.


import jmputils jmputils.jpip('install --upgrade', 'pip setuptools') jmputils.jpip('install', 'pandas')

Re: Installing python packages in JMP 19

Yes, the JSL should use double quotes for the string instead of the single quotes.  Not sure how that got past our automated tests.

Recommended Articles