cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
hardner
Level VI

JMP 14 Python abilities - working? I'm confused

I'm trying to use the new abilities in JMP 14 to run python and it's not working.  Basically not finding my python install I think though in some circumstances it just crashes. 

 

I saw another discussion  saying there were issues with that in 14.1 and suggesting a workaround about setting environment variables and using Use Python Version("3.6") as an argument to Python Init()   (both of which I tried unsuccessfully).

 

Then I saw in release notes of 14.2 more about this, including a different name for relevant enviroment variable...

https://www.jmp.com/support/help/14-2/how-jmp-finds-python-on-windows.shtml

 

So, I went to upgrade from 14.1 and saw there is now 14.3 and got that. when I try the environment variable instructions from the 14.2 post I get a message saying that is deprecated and now it should be JMP_PYTHON_MODULE_PATH.  So I tried that, I think with a valid path to the right file, using same format from the 14.2 post,  but still not working.  Occured to me to try this in my JMP15 early adopter version as well and got same results, same message that the environment variable should be called JMP_PYTHON_MODULE_PATH.

 

In all cases (14.1, 14.3, 15 early adopter,  various versions of environment variables)  if I have no argument in Python Init(),  JMP crashes right away on that line.  If I have the UsePythonVersion("3.6") in there it comes back with an error saying it can't find Python at all..

 

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/*###*/(Use Python Version( "3.6" ))

 

Is anyone using this successfully?  If so are you putting something inside Python Init()? 

or if you used setting an environment variable what is it called and what does it look like?  Any further troubleshooting advice?

 

Here's what my latest attempt at environment variable looks like... is this not the right format? (the earlier post looked like environment variable had curly brackets and double quotes like JMP wanted to see is as a JSL list format but this looks like what the 4.2 post is saying to do and other format didn't work for me either...  A python36.dll file really does seem to be in this location... env variable issue.png

 

Not sure if I'm having a freak problem specific to my system that I need tech support on or whether I just don't get the latest verison of how this is supposed to work.

31 REPLIES 31
uday_guntupalli
Level VIII

Re: JMP 14 Python abilities - working? I'm confused

@Paul_Nelson ,
  Indeed. I have checked and validated that both JMP and Python are both 64-bit. 

 

image.png

image.png

 

Best
Uday

Re: JMP 14 Python abilities - working? I'm confused

I was hoping for a mismatch and your problems would suddenly be solved.

I have just added additional code to catch exceptions when we try to load Python. I will also look at adding code so the Init Trace(“TRUE”) writes to a file as well as the log so that we can get some trace of the execution path for Python initialization. Hopefully both should be in the next JMP 15 EA. (not sure when the next one is due).

Paul

Re: JMP 14 Python abilities - working? I'm confused

I would also update to the latest version of JMP 14. Additional work was done in each version of JMP 14.x to improve finding Python and properly loading it.
hardner
Level VI

Re: JMP 14 Python abilities - working? I'm confused

For what it's worth mine are definitely both 64 bit and I get the crashing as well.  The only time mine doesn't crash on Python Init() is  with the Use Python Version() argument when I get the "can't find" message.

uday_guntupalli
Level VIII

Re: JMP 14 Python abilities - working? I'm confused

@hardner and @Paul_Nelson , 
    Paul,I can concur with @hardner 's observations. Is it ok to ask you to do a webex with us may be tomorrow or maybe next week, what ever works for you, where you can look at our installations and tell us why it is not working ? You can then probably publish a renewed Blog article on the community based on the learnings we take away from the meeting ? Is this something you could do ? 

 

Best
Uday
Jeff_Perkinson
Community Manager Community Manager

Re: JMP 14 Python abilities - working? I'm confused

The very first thing you should to do is to update to a newer version of JMP 14. The original 14.0.0 worked fine if it could automatically detect the proper Python installation. But, if it couldn’t correctly locate Python, none of the other methods worked well at all. The work in the successive updates 14.1, 14.2,… have made the other alternatives work better, the checking environment variables, the use of the Python Init() variables. It still may not work in your specific environment, but this the first place to start.

You should continue to work with JMP’s technical support. By going through technical support, all JMP customers benefit by what we work out on this issue. At the moment it’s going to take some more digging in the code, some additional instrumenting of the code and some additional bullet-proofing of the code, it may even take writing a test or diagnostic program.

Thanks for your patience.
Paul
-Jeff
uday_guntupalli
Level VIII

Re: JMP 14 Python abilities - working? I'm confused

@Paul_Nelson & @Jeff_Perkinson ,
     Updated JMP to 14.3 and can confirm that crashing still continues. Let me know if there is any further information you need. 

 

 

Best
Uday
hardner
Level VI

Re: JMP 14 Python abilities - working? I'm confused

For what it's worth mine are definitely both 64 bit and I get the crashing as well.  The only time mine doesn't crash on Python Init() is  with the Use Python Version() argument when I get the "can't find" message.
hardner
Level VI

Re: JMP 14 Python abilities - working? I'm confused

Working!

 

Here's what worked for me:

 

I reinstalled Anaconda using an archived one meant for Python 3.6 (to avoid using a virtual environment for 3.6).  Here's where it installed, same as previous just without 2 more layers for virtual env under anaconda3 folder):

C:\Users\12470\AppData\Local\Continuum\anaconda3\python36.dll

 

Set environment variable JMP_PYTHON_MODULE_PATH to the above path for python36.dll

 

Did not use UsePythonVersion("3.6") argument in python init(), that gives the "installation cannot be found" error. 

 

Nothing I'm trying after the reinstall is, so far, causing a crash.  Admittedly haven't done much but appears that it was something about the virtual environment that was causing crashing (?).  Limited testing I've done so far is working in both 14.3 and the 15EA.

 

Thanks!

hardner
Level VI

Re: JMP 14 Python abilities - working? I'm confused

more on UsePythonVersion("3.6"), just in case it's useful....

 

this line does not work when JMP is first opened...

Python Init(Use Python Version( "3.6" ), InitTrace( "True" ));

 

Here's what the log shows from the InitTrace()...

 

Processing OpPythonInit operator

Starting JMP to Python interface initialization

Query HKEY_CURRENT_USER

Reading hKey=0XFFFFFFFF80000001 kname=SOFTWARE\Python\PythonCore bits=64

Found hKey=0xFFFFFFFF80000001 kname=SOFTWARE\Python\PythonCore bits=64

# of subkeys=1

Retrieving subkey #=0

subkey=3.6 length=3

Opening subkey=3.6

Opening key=3.6 subkey=InstallPath

Query value key=3.6 subkey=InstallPath

Query value key=3.6 subkey=InstallPath value=C:\Users\12470\AppData\Local\Continuum\anaconda3

Opening key=3.6 subkey=PythonPath

Query value key=3.6 subkey=PythonPath

Building path to version=3.6 of the Python DLL

 

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/*###*/(Use Python Version( "3.6" ), InitTrace( "True" ))

 

This happens repeatedly if I run the line over and over but if I do this version without UsePythonVersion...

Python Init(InitTrace( "True" ));

Not only does it work, but after that the original version with UsePythonVersion("3.6") argument starts working too, while this JMP session is open.  Here's what the log shows from that init trace in that case.  path showing there look same and correct to me in both cases....

 

Query HKEY_CURRENT_USER

Reading hKey=0XFFFFFFFF80000001 kname=SOFTWARE\Python\PythonCore bits=64

Found hKey=0xFFFFFFFF80000001 kname=SOFTWARE\Python\PythonCore bits=64

# of subkeys=1

Retrieving subkey #=0

subkey=3.6 length=3

Opening subkey=3.6

Opening key=3.6 subkey=InstallPath

Query value key=3.6 subkey=InstallPath

Query value key=3.6 subkey=InstallPath value=C:\Users\12470\AppData\Local\Continuum\anaconda3

Opening key=3.6 subkey=PythonPath

Query value key=3.6 subkey=PythonPath

Building path to version=3.6 of the Python DLL

Python DLL path=C:\Users\12470\AppData\Local\Continuum\anaconda3\python36.dll

sys.path entry.jstr:C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\Lib

sys.path entry.jstr:C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\DLLs

BEFORE:

/**********/

print(_JMPsys.path)

/**********/

['C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\python36.zip', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\Lib', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\DLLs', 'C:\\Program Files\\SAS\\JMP\\14', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\Babel-2.5.0-py3.6.egg', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\win32', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\win32\\lib', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\Pythonwin']

AFTER:

/**********/

print(_JMPsys.path)

/**********/

['', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\python36.zip', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\Lib', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\DLLs', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\win32', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\win32\\lib', 'C:\\Users\\12470\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\Pythonwin']