We were able replicate on a development machine, the sudden exit of JMP when trying to load Python 3.7. It turns out we (JMP) are not alone in having problems with Python 3.7, and Python 3.8 especially in an embedded case. The error we got from Python is:
Fatal Python error: unable to load the file system codec
Unhandled exception at 0x00007FFE84F9B64E (ucrtbase.dll) in Jmp.exe: Fatal program exit requested.
The solution at present, is to either use Python 3.6.5 or newer 3.6.x, or you have to install Python 3.7.x on Windows as an install for all users, not just you the local user AND you MUST choose the option to put the Python in your PATH. This directly contradicts Anaconda3's install dialog, warning about not putting it in the path.
My development machine works fine with 3.7.1 installed as a system wide install and is the default Python on the Path. My co-worker's machine where we were able to replicate the sudden abort of JMP, we installed Python 3.7.1 using the default install options which made a local install not on the path. We were able to keep JMP from exiting by setting the environment variable PYTHONHOME= 'the anaconda3 directory' But even here we couldn't get it to load numpy, scipi, pandas, or sqlite3, even from a console prompt. Where on my machine all works as expected.
I'm not sure I understand your question. Installing Python for all users does indeed require admin access, but using the installed Python does not require admin access. A JMP add-in that called Python would not require admin access to install or run. Yes additional Python packages that are installed for all users would require admin access. You should be able to install site local packages on a per user basis that would not require admin to install. This is something I have been meaning to test, but have had a chance to try. It might require you updating the sys.path to add the location of the site local packages.
As for JMP 15 documentation, I know some of this discussion has made it in. Unfortunately, not everything has made it into docs before the cutoff. We'll work on getting the rest of it in through the maintenance releases.
I can confirm that with Windows 10 and JMP 14.2 it works out of the box, if:
Anaconda Python 3.6* 64bit is installed > https://repo.continuum.io/archive/Anaconda3-5.2.0-Windows-x86_64.exe;
and the PATH option is activated (no admin rights required)
My point was more about the capability of deploying addins with a portable Python version so users do not need to hassle with the Anaconda installation, environments and versioning.
Thanks for the help. Looking forward to seeing a great Python integration in the following updates.
(*) With the current version of Anaconda, JMP crashes with this config.
Just butting back into this thread as OP to say...
- I've been using Python more since my original post and what I said was working for me has continued to work. :-)
- I appreciate efforts to support Python, more so now I have found specific things to use it for. Thanks!
- Like FN I find sharing addins that call Python problematic. I do share a lot of addins. I'm using this now just for myself and for jobs that I run that then share outcomes with others but not in scripts to be run by others. I'd have to give complicated instructions on installing Python and packages and worry about the specific versions working together (same issue occurs with R which I use but not in shared scripts). But if a particular version were encapsulated within JMP it would limit what we can do with it. Still think maybe supporting virutal environments could help, then I could instruct and support users on setting up an installation to my specfications for a particular tool they want to use and not interfere with any other Python activities on their machine. But not really sure what would be best and not that keen to troubleshoot users Python installations. So just agreeing it's not ideal and noting I do have some interest in making more use of this ability.
Hi there @hardner,
Good to know you have been using Python with JMP more. If you can share what you have been doing, we would love to know!
Regarding support for virtual environments, I hear you. It does make a big difference in terms of keeping your dependencies organized, AND helping your co-workers reproduce your environment in order to run your addins.
Which is why I put together a little library that helps with that very problem. Please check:
Lots of examples, tested in 14.3 and 15.1. But, at least for now, Windows-only and Anaconda-specific.
Let me know if it works for you!
This looks great - thanks! I don't have time to test it out for at least a couple of weeks (and I completely redid my Python install w/o virtual environment so will take some doing to try this) but I will be keen to test this out soon.
The thing that really jump started my Python use is classifying images with tensorflow and keras. I'm running a JMP script that queries up relevant images and calls python to run my model and then pushes results to Oracle. That entire task is something I will probably end up doing in Python but which I'm doing in JSL because I'm much more proficient in that so far - just learning in Python- and I already have a whole scheme for running JSL automated jobs, have functions built for pushing tables to our Oracle, etc.
However, while I thought that whole project would not be inherently JMP-related I actually found that having images in a JMP table alongside other data where they can be interacted with in all the usual JMP ways is really useful - sorting, selecting based on other data columns, etc.. That spurred me to do a number of other image-related addins. Remains to be seen whether in the end there's a true need in my project to call up the Python during a live interactive JMP session or they can be separate ( a tool that reviews tf model results interactively just querying up results from Oracle, not directly calling Python to run models live?) but I'm currently using them together.
Anyway, that's the not-in-JMP thing I'm using Python for now. I'm trying to learn more Python and have colleagues who are expert in it and I feel likely to find more things where I might like to actually call Python to join its abilities with JMP.
Nice! That is a great use case.
As you search for the ideal JMP + Python workflow, it is worth noting that JMP (Pro) can generate Python scoring code for JMP models. That supports integration in the other direction: pushing JMP capabilities into the Python world.
For example, say you wanted to apply a JMP model to a large data table in Oracle, you could convert the model to Python and score it in the database using UDFs (support seems to be experimental though):
Or you could share your JMP model with your Python colleague so that she could run it in a Jupyter notebook, and so on.
Also, JMP 15.0 will make it easier to display external images as thumbnails in your data visualization tooltips. That would reduce/eliminate the need to import them directly to your JMP tables, keeping them smaller. There is a performance cost of course, but it might be a worthy trade-off. Keep an eye out for that.
Thanks for sharing! Keep us posted on your journey!
Regarding deployment, I think it will be fine as soon as Python does not interfer with other user installations.
For example, I am trying to call Python from JMP 15 EA8 which is in one specific folder.
This folder contains all the instalation files of Anaconda/miniconda, which I copied to a folder before uninstalling it. The code worked when it was installed. Now, it seems that JMP does not use the path I am specifying.
Set Environment Variable( "JMP_PYTHON_MODULE_PATH", "\["", "C:/Users/xxx/JMP_scripting/python/miniconda3/python36.zip", "C:/Users/xxx/JMP_scripting/python/miniconda3/DLLs", "C:/Users/xxx/JMP_scripting/python/miniconda3/lib", "C:/Users/xxx/JMP_scripting/python/miniconda3", "C:/Users/xxx/JMP_scripting/python/miniconda3/lib/site-packages", "C:/Users/xxx/JMP_scripting/python/miniconda3/lib/site-packages/win32", "C:/Users/xxx/JMP_scripting/python/miniconda3/lib/site-packages/win32/lib", "C:/Users/xxx/JMP_scripting/python/miniconda3/lib/site-packages/Pythonwin"]\" ); Python Init (Path("C:\Users\xxx\JMP_scripting\python\miniconda3"), Init Trace("TRUE"), Debug Print Statements ("TRUE"), Debug Print Output("TRUE") ); Python Submit( "\[basket = ["apple", "orange", "pear"] print(basket)]\" ); Python Term();
Error in JMP 15 EA8
Error in JMP Pro 14.2:
An installation of Python cannot be found on this system. JMP Python support requires Python version 3.0 or higher. in access or evaluation of 'Python Init' , Python Init/*###*/(Path(