Py fails in Win Terminal - fixed
USER>do $System.Python.Shell()
ERROR #5002: ObjectScript-Error: <OBJECT DISPATCH>Shell+16^%SYS.Python.1
*Failed to Load Python: Check documentation and messages.log,
Check CPF parameters:[PythonRuntimeLibrary,PythonRuntimeLibraryVersion],
Check sys.path setup in: $INSTANCE/lib/python/iris_site.py
ObjectScriptObjectScript
02/03/25-18:27:39:497 (13156) 1 [Generic.Event] CPF settings (PythonRuntimeLibraryVersion) do not specify python correctly - Python can not be loaded 02/03/25-18:27:39:498 (13156) 1 [Generic.Event] CPF settings (PythonRuntimeLibrary) do not specify python correctly - Python can not be loaded
my iris.CPF just shows nothing. what is the correctly formatted content ?
^CONFIG("config","PythonPath")="" ^CONFIG("config","PythonRuntimeLibrary")="" ^CONFIG("config","PythonRuntimeLibraryVersion")=""
next from iris_site.py:
>>> print(get_win_python_install_dir()) C:\Program Files\Python313 >>> print( __sitegetsitepackages([get_win_python_install_dir()])) ['C:\\Program Files\\Python313', 'C:\\Program Files\\Python313\\Lib\\site-packages'] >>> print(sys.path) ['', 'C:\\Program Files\\Python313\\python313.zip', 'C:\\Program Files\\Python313\\DLLs', 'C:\\Program Files\\Python313\\Lib', 'C:\\Program Files\\Python313', 'C:\\Program Files\\Python313\\Lib\\site-packages']
Various attempts to set iris.CPF according to docs / examples manually failed
What else can I check?
PythonPath=C:\Program Files\Python313 PythonRuntimeLibrary=C:\Program Files\Python313\python3.dll PythonRuntimeLibraryVersion=3.13
Also downgrade to Python 3.9.13 didn't improve anything.
Product version: IRIS 2024.3
$ZV: IRIS for Windows (x86-64) 2024.3 (Build 217U)
Please note the following warning:
Thanks. but 3.9.13 was no improvement.
I installed Python 3.12.8 (x64) and configured it according to the documentation (link is given above)
Everything is working fine:
By the way, I didn't touch PythonPath.
can you give a try to https://github.com/grongierisc/iris-embedded-python-wrapper.
follow the readme, it will give you the instruction to work with venv and a chosen version of python and bind it to iris.
behind the scene, this module help to setup the PythonPath, PythonRuntimeLibray and PythonRuntimeLibrayVersion
let me know, if you find any issue.
Btw, it will not solve the python 3.13 issue, you need to upgrade to 2025.1 to support it.
Merci,
As noted I'm back to python 3.9.13. sys.path looks correct
the problem persists
message log shows:
NTFS error 126 indicates also a problem in DLL registry.
I used an official 64bit installer. Probably Pre-WIn11 design.
I was interested and I decided to check:
Here is exactly the version 3.9.13, and not 3.13?
After un-install of my own python versions
PY was still there in a different hidden and protected version unknown for me.
I detected it using regedit
C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.12_3.12.2288.0_x64__qbz5n2kfra8p0\
I fail to explain where it came from (pre-installed win ?? )
Manual killing it and reinstallation of an official Python distribution fixed it.
BIG THANKS for your advise and help-
I just identified a possible source of the hidden Python installation:
https://docs.intersystems.com/iris20243/csp/docbook/DocBook.UI.Page.cls?KEY=GEPYTHON_prereqs#GEPYTHON_prereqs_version
I did an upgrade from my previous IRIS 2024.1