Code to write JMP table to python
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?
ScriptingRe: Code to write JMP table to python64-bit JMP requires 64-bit Python 3, and 32-bit JMP requires 32-bit Python 3. Further any of the modules you install need to be installed for that version of Python, so if you had Numpy installed in the 32-bit version of Python, that version will NOT work with 64-bit JMP or 64-bit Python.
The issue is that JMP loads the Python shared library (.dll, .so, .dylib,...) into its process space. As a result, Python and JMP both must be 32-bit or both 64-bit. Numpy is one of the Python modules that heavily depends on native compiled code for the extension, rather than pure Python code which is system agnostic. So it too must match the 32/64 bit-ness of JMP and Python. Install Numpy, spicy, and pandas using the version of pip or pip3 located in the same directories as the Python you are using.
Re: Code to write JMP table to pythonJMP uses the pandas package, specifically a pandas data frame, to send data tables back and forth with Python. You need the missing Python packages for all of JMP's functionality to work properly. For best success you should be using a Python.org version of Python. With more than one version of Python on your system you will likely need to use the optional argument to the Python Init(). The bit-ness of the Python has to match the bit-ness of JMP. 64-bit JMP requires 64-bit Python, as JMP is loading the Python dll. Anaconda is a lot more troublesome get to a working configuration, as it is designed to be the keeper, manager of everything Python. It does not play nearly as nicely if you are trying to embed Python.
The additional packages needed by the first versions of JMP with Python support are numpy, pandas, scipy, matplotlib, and Qt5. This list has been pared down so that the most recent versions of JMP only require numpy, pandas, and matplotlib. From your log warnings, you need numpy, scipy and pandas.
Use Python's package manager pip ( or pip3 ). Make sure you use the pip in the same directory tree as the Python version you want to use with JMP.
pip install numpy scipy pandas
This will download and install the Python packages from public Python repositories and install them on your machine.
Re: Code to write JMP table to pythonI 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
//:*/
Re: Code to write JMP table to pythonWhere 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.
Re: Code to write JMP table to pythonIt 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.
Re: Code to write JMP table to pythonAre 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?
Re: Code to write JMP table to pythonIt 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.comRe: 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
Re: Code to write JMP table to pythonThis 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
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
Re: Code to write JMP table to pythonNothing happens? Is a JMP data table open at the point where you run the script? Are there any messages in the JMP Log?