BookmarkSubscribe
Choose Language Hide Translation Bar
uday_guntupalli
Community Trekker

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
0 Kudos

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
0 Kudos

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.
0 Kudos
Highlighted
hardner
Community Trekker

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
Community Trekker

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
0 Kudos
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
0 Kudos
uday_guntupalli
Community Trekker

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
0 Kudos
hardner
Community Trekker

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.
0 Kudos
hardner
Community Trekker

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
Community Trekker

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']