I’m moving Orthanc to another system. UBUNTU 20.04. Compiled orthanc and the orthanc-python (mainline) from source. When I start up Orthanc I get the following errors. My plugin, combined.py, imports both pydicom and pdfkit. When I comment those out and restart Orthanc it starts up without error.
`
Orthanc version: mainline (20200830T165517)
W0830 13:32:50.306206 main.cpp:802] Loading plugin(s) from: /home/sscotti/Desktop/OrthancConfig/plugins/libOrthancPython.so.mainline
W0830 13:32:50.309307 PluginsManager.cpp:269] Registering plugin ‘python’ (version mainline)
W0830 13:32:50.309342 PluginsManager.cpp:168] Python plugin is initializing
W0830 13:32:50.309691 PluginsManager.cpp:168] Using Python script “combined.py” from directory: /home/sscotti/Desktop/OrthancConfig/plugins
W0830 13:32:50.309733 PluginsManager.cpp:168] Force global loading of Python shared library: /lib/x86_64-linux-gnu/libpython3.8.so.1.0
W0830 13:32:50.309843 PluginsManager.cpp:168] Program name: /home/sscotti/Desktop/orthanc/Build/Orthanc
E0830 13:32:50.369613 PluginsManager.cpp:164] Error during the installation of the Python script, traceback:
<class ‘ModuleNotFoundError’>
No module named ‘pydicom’
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 671, in _load_unlocked
File “”, line 783, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/home/sscotti/Desktop/OrthancConfig/plugins/combined.py”, line 4, in
import pydicom
File “”, line 991, in _find_and_load
File “”, line 973, in _find_and_load_unlocked
E0830 13:32:50.369701 PluginsManager.cpp:102] Error while initializing plugin
`
My system has Python 3.8.2, which I think is installed by default on 20.04. When I built the plugin from source the compilation appeared to go OK.
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") -- Checking for module 'python-3.8-embed' -- Found python-3.8-embed, version 3.8 -- Configuring done -- Generating done
pip3 list includes the two modules that I want enabled with the plugin (pdfkit and pydicom), and those were installed before building the plug-in:
pdfkit 0.6.1 pexpect 4.6.0 Pillow 7.0.0 pip 20.0.2 protobuf 3.6.1 pycairo 1.16.2 pycups 1.9.73 pydicom 2.0.0
The cmake was:cmake … -DPYTHON_VERSION=3.8 -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release
After commenting out import pydicom an import pdfkit:
`
W0830 13:53:58.178403 main.cpp:802] Loading plugin(s) from: /home/sscotti/Desktop/OrthancConfig/plugins/libOrthancPython.so.mainline
W0830 13:53:58.181938 PluginsManager.cpp:269] Registering plugin ‘python’ (version mainline)
W0830 13:53:58.181983 PluginsManager.cpp:168] Python plugin is initializing
W0830 13:53:58.182487 PluginsManager.cpp:168] Using Python script “combined.py” from directory: /home/sscotti/Desktop/OrthancConfig/plugins
W0830 13:53:58.182542 PluginsManager.cpp:168] Force global loading of Python shared library: /lib/x86_64-linux-gnu/libpython3.8.so.1.0
W0830 13:53:58.182781 PluginsManager.cpp:168] Program name: /home/sscotti/Desktop/orthanc/Build/Orthanc
. . . orthanc starts up
`
Just leaving out for now, but would like to compile with those modules enabled. Any suggestions appreciated.
Thanks.