cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
bjbreitling
Level IV

Code to write JMP table to python

bjbreitling_0-1596749134723.png

The above is some code I got from JMP documentation but when I run it nothing happens. I have 64-bit version of python 3.8 and JMP Pro 15. Can anyone help me with this?

 

Do I need to add numpy and scipy and pandas? I have those in my python downloads. Do I need to put them in a different folder too for JMP to query?

11 REPLIES 11
David_Burnham
Super User (Alumni)

Re: Code to write JMP table to python

Nothing happens?  Is a JMP data table open at the point where you run the script? Are there any messages in the JMP Log?

-Dave
bjbreitling
Level IV

Re: Code to write JMP table to python

/**********/
# Import the numpy module for array and matrix support
import numpy as _JMPnp
/**********/

/**********/
# Import the scipy module for scientific computing support
import scipy as _JMPsp
/**********/

/**********/
# Import the pandas module for Series/Data Frame support
import pandas as _JMPpd
/**********/

Unable to import the 'numpy' Python module
Unable to import the 'scipy' Python module
Unable to import the 'pandas' Python module
bjbreitling
Level IV

Re: Code to write JMP table to python

This is what the log says:


/**********/
# Import the numpy module for array and matrix support
import numpy as _JMPnp
/**********/

/**********/
# Import the scipy module for scientific computing support
import scipy as _JMPsp
/**********/

/**********/
# Import the pandas module for Series/Data Frame support
import pandas as _JMPpd
/**********/

Unable to import the 'numpy' Python module
Unable to import the 'scipy' Python module
Unable to import the 'pandas' Python module

 

/**********/
print (dt)
/**********/

0

bjbreitling
Level IV

Re: Code to write JMP table to python

/**********/
# Import the numpy module for array and matrix support
import numpy as _JMPnp
/**********/

/**********/
# Import the scipy module for scientific computing support
import scipy as _JMPsp
/**********/
Here is the JMP log of the script. I have installed all of these packages in my 64 bit python site-packages folder.
/**********/
# Import the pandas module for Series/Data Frame support
import pandas as _JMPpd
/**********/

Unable to import the 'numpy' Python module
Unable to import the 'scipy' Python module
Unable to import the 'pandas' Python module

txnelson
Super User

Re: Code to write JMP table to python

It appears the Community is not able to help. Please submit this to JMP Support so you can get a tracking number, and the correct JMP individuals to look into the issue.
support@jmp.com
Jim
vince_faller
Super User (Alumni)

Re: Code to write JMP table to python

Are you using anaconda or just python?  Maybe JMP is not seeing the correct version of Python is my thought.  

Are you able to run a .py file with just those imports?

 

 

Vince Faller - Predictum
bjbreitling
Level IV

Re: Code to write JMP table to python

It was saying I had a 32-bit version of python as an error when running the script so I uninstalled that version and re-installed a 64-bit version. I also have a separate anaconda installation as well. I don't get that error anymore but it doesn't see those packages that I have installed apparently.

vince_faller
Super User (Alumni)

Re: Code to write JMP table to python

Where do you have those packages installed?  If you have multiple versions of python my guess is JMP is looking at one that you don't have them installed on.  

Vince Faller - Predictum
bjbreitling
Level IV

Re: Code to write JMP table to python

I had uninstalled the anaconda before reinstalling it after it didnt help so I had only one copy at some point.

Heres what I get from the log when I run the following:

 

Names Default To Here( 1 );

Python Init();

version = Python Get Version();

Show( version );

Python Term();

 

LOG:

 

/*:

version = {3, 8, 5, "final", 0};
0
//:*/