質問
· 18 hr 前

IRIS Community 2024.1から2024.3へアップデート後のPythonロードエラーについて

Windows11環境で、IRISライセンス切れのため、IRIS_Community-2024.1.0.262.0-win_x64 から IRIS_Community-2024.3.0.217.0-win_x64 へアップデートしました。

Python関連の実行をすると、Failed to Load Python のエラーが出るようになりました。

USER>d ##Class(%SYS.Python).Shell()
 
エラー #5002: ObjectScript エラー:<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

message.logに

Startup of InterSystems IRIS [IRIS for Windows (x86-64) 2024.3 (Build 217U) Thu Nov 14 2024 17:59:58 EST]
...
02/28/25-12:15:07:017 (17728) 1 [Generic.Event] CPF settings (PythonRuntimeLibraryVersion) do not specify python correctly - Python can not be loaded
02/28/25-12:15:07:017 (14616) 1 [Generic.Event] CPF settings (PythonRuntimeLibraryVersion) do not specify python correctly - Python can not be loaded
02/28/25-12:15:07:017 (17728) 1 [Generic.Event] CPF settings (PythonRuntimeLibrary) do not specify python correctly - Python can not be loaded
02/28/25-12:15:07:017 (14616) 1 [Generic.Event] CPF settings (PythonRuntimeLibrary) do not specify python correctly - Python can not be loaded

がありました。

対応が分かれば教えてもらえませんでしょうか?

Product version: IRIS 2024.3
$ZV: IRIS for Windows (x86-64) 2024.3 (Build 217U) Thu Nov 14 2024 17:59:58 EST
ディスカッション (2)1
続けるにはログインするか新規登録を行ってください

@ima さん、こんにちは。

Windows版 IRIS ですが、バージョン2024.2以降から IRIS のインストールと同時に Python がインストールされなくなりました。

ご参考(Note:の下に記載があります):https://docs.intersystems.com/iris20243/csp/docbook/DocBook.UI.Page.cls?KEY=GEPYTHON_prereqs#GEPYTHON_prereqs_version

そのため、Windows 版 IRIS 2024.2以降では、WindowsへのPythonインストールが必要になりました。

PythonのバージョンやIRIS側の設定について詳しくは、「第2回 開発者コミュニティ・ミートアップ Python ワークショップの事前準備について」の3つ目の返信をご参照ください。

Iijimaさん

ありがとうございます。Python Load 成功しました。

追加で質問です。

Pythonパッケージのインストール(アップグレード)方法とその場所について

IRIS 2024.2からirispipコマンドもなくなっているようでね。

第2回-開発者コミュニティ・ミートアップ より例:
pip3 install flask

マニュアルより
Install Python Packages on Windows
https://docs.intersystems.com/iris20243/csp/docbook/DocBook.UI.Page.cls?...
On Windows, the irispip command was removed in InterSystems IRIS 2024.2. 
On Windows, use the command python -m pip install --target <installdir>\mgr\python <package>.

それで、インストールコマンドは

python3 -m pip install --target <installdir>\mgr\python <package>
または
pip3 install --target <installdir>\mgr\python <package>

が正解ですか?
--target は省略可能ですか?(その場合、パッケージの保存場所や埋め込みPythonでの利用は?)

ちなみに、Python3.12 標準インストール後も、以前、irispipでインストールしていたパッケージは一応動いているようです。