ModuleNotFoundError: No module named 'pydicom._storage_sopclass_uids'
Describe the bug Following the directions here: https://docs.monai.io/projects/label/en/latest/quickstart.html For Radiology Tutorial #1. I receive the following error:
ModuleNotFoundError: No module named 'pydicom._storage_sopclass_uids'
Server logs $ monailabel start_server --app apps/radiology --studies datasets/Task09_Spleen/imagesTr --conf models segmentation_spleen Using PYTHONPATH=/home/user:
In the future np.bool will be defined as the corresponding NumPy scalar.
In the future np.bool will be defined as the corresponding NumPy scalar.
In the future np.bool will be defined as the corresponding NumPy scalar.
[2025-06-22 18:32:04,899] [9824] [MainThread] [INFO] (main:285) - USING:: version = False
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: app = /home/user/segmentation/apps/radiology
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: studies = /home/user/segmentation/datasets/Task09_Spleen/imagesTr
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: verbose = INFO
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: conf = [['models', 'segmentation_spleen']]
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: host = 0.0.0.0
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: port = 8000
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: uvicorn_app = monailabel.app:app
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: ssl_keyfile = None
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: ssl_certfile = None
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: ssl_keyfile_password = None
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: ssl_ca_certs = None
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: workers = None
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: limit_concurrency = None
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: access_log = False
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: root_path =
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: log_level = info
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: log_config = None
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: dryrun = False
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:285) - USING:: action = start_server
[2025-06-22 18:32:04,900] [9824] [MainThread] [INFO] (main:296) -
[2025-06-22 18:32:05,151] [9824] [MainThread] [WARNING] (pydicom:82) - get_frame_offsets is deprecated and will be removed in v4.0
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/user/.local/lib/python3.10/site-packages/monailabel/main.py", line 356, in
To Reproduce Steps to reproduce the behavior:
install MONAI Label
pip install monailabel
download Radiology sample app to local directory
monailabel apps --name radiology --download --output .
download Task 2 MSD dataset
monailabel datasets --download --name Task09_Spleen --output .
start the Radiology app in MONAI label server
and start annotating the downloaded images using deepedit model
monailabel start_server --app radiology --studies Task09_Spleen/imagesTr --conf models deepedit
Expected behavior Successful start of MonaiLabel
Environment
Ensuring you use the relevant python executable, please paste the output of:
python -c 'import monai; monai.config.print_debug_info()'
=============================== Printing MONAI config...
MONAI version: 1.5.0
Numpy version: 1.26.4
Pytorch version: 2.6.0+cu124
MONAI flags: HAS_EXT = False, USE_COMPILED = False, USE_META_DICT = False
MONAI rev id: d388d1c6fec8cb3a0eebee5b5a0b9776ca59ca83
MONAI file: /home/
Optional dependencies:
In the future np.bool will be defined as the corresponding NumPy scalar.
Pytorch Ignite version: 0.4.11
ITK version: NOT INSTALLED or UNKNOWN VERSION.
Nibabel version: 5.3.2
scikit-image version: 0.25.2
scipy version: 1.15.3
Pillow version: 11.2.1
Tensorboard version: 2.19.0
gdown version: 5.2.0
TorchVision version: 0.21.0+cu124
tqdm version: 4.67.1
lmdb version: 1.6.2
psutil version: 7.0.0
pandas version: 2.3.0
einops version: 0.8.1
transformers version: NOT INSTALLED or UNKNOWN VERSION.
mlflow version: 3.1.0
pynrrd version: 1.1.3
clearml version: NOT INSTALLED or UNKNOWN VERSION.
For details about installing the optional dependencies, please visit: https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies
================================ Printing system config...
System: Linux Linux version: Ubuntu 22.04.5 LTS Platform: Linux-6.8.0-1030-gcp-x86_64-with-glibc2.35 Processor: x86_64 Machine: x86_64 Python version: 3.10.12 Process name: python Command: ['python', '-c', 'import monai; monai.config.print_debug_info()'] Open files: [] Num physical CPUs: 4 Num logical CPUs: 8 Num usable CPUs: 8 CPU usage (%): [5.2, 5.2, 4.8, 5.2, 5.2, 5.2, 4.8, 100.0] CPU freq. (MHz): 2300 Load avg. in last 1, 5, 15 mins (%): [1.0, 0.6, 0.8] Disk usage (%): 3.9 Avg. sensor temp. (Celsius): UNKNOWN for given OS Total physical memory (GB): 51.0 Available memory (GB): 49.5 Used memory (GB): 0.9
================================ Printing GPU config...
Num GPUs: 1 Has CUDA: True CUDA version: 12.4 cuDNN enabled: True NVIDIA_TF32_OVERRIDE: None TORCH_ALLOW_TF32_CUBLAS_OVERRIDE: None cuDNN version: 90100 Current device: 0 Library compiled for CUDA architectures: ['sm_50', 'sm_60', 'sm_70', 'sm_75', 'sm_80', 'sm_86', 'sm_90'] GPU 0 Name: Tesla T4 GPU 0 Is integrated: False GPU 0 Is multi GPU board: False GPU 0 Multi processor count: 40 GPU 0 Total memory (GB): 14.6 GPU 0 CUDA capability (maj.min): 7.5
Also running into this bug.
MONAI version: 1.5.0
Numpy version: 1.26.4
Pytorch version: 2.6.0+cpu
MONAI Flags: HAS EXT = False, USE COMPILED = False, USE META DICT = False
MONAI rev id: d388d1c6fec8cb3a0eebee5b5a0b9776ca59ca83
MONAI File: C:\Users\<username>\Desktop\monai\venv\Lib\site-packages\wonal\_init...py
Optional dependencies:
Pytorch Ignite version: 6.4.11
ITK version: 5.4.4
Nibabel version: 5.3.2
scikit-image version: 6.25.2
scipy version: 1.16.0
Pillow version: 11.2.1
Tensorboard version: 2.19.0
gdown version: 5.2.0
TorchVision version: 0.21.0+cpu
tqdm version: 4.67.1
lmdb version: 1.6.2
psutil version: 7.0.0
pandas version: 2.3.0
einops version: 0.8.1
transformers version: NOT INSTALLED or UNKNOWN VERSION.
mlflow version: 3.1.0
pynrrd version: 1.1.3
clearml version: NOT INSTALLED or UNKNOWN VERSION.
Printing system config...
System: Windows
Win32 version: ('11', '10.0.26100', 'SPO', 'Multiprocessor Free')
Win32 edition: Professional
Platform: Windows-11-10.0.26100-SP0
Processor: Intel64 Family 6 Model 85 Stepping 4, GenuineIntel
Machine: AMD64
Python version: 3.12.10
Process name: python.exe Command: ['C:\\Users\\Admin\\.pyenv\\pyenv-win\\versions\13.12.10\\python.exe", 'c', 'import monai; monai.config.print_debug_info()']
Open files: (popenfile(path='C:\\Windows\\System32\\en-US\\tzres.dll.mut', fd=-1), popenfile(pathe 'C:\\Windows\\System32
\\en-US\\KernelBase.dll.mui, fd=-1)]
Num physical CPUs: 10 Nun Logical CPUs: 20
Num usable CPUs: 20
CPU usage (%): [16.0, 3.7, 30.9, 0.7, 12.3, 5.5, 6.3, 5.3, 9.7, 5.8, 8.6, 8.9, 9.0, 4.0, 7.0, 4.2, 14.7, 4.7, 7.0, 35.0]
CPU Freq. (MHz): 3504
Load avg. in last 1, 5, 15 mins (%): [0.0, 0.0, 0.0]
Disk usage (%): 53.2
Avg. sensor temp. (Celsius): UNKNOWN fer given OS
Total physical memory (GB): 255.7
Available memory (GB): 239.9
Used memory (GB): 15.8
Printing GPU config.
Num GPUs:
Has CUDA: False
cuDNN enabled: False
NVIDIA TF32 OVERRIDE: None
TORCH ALLOW TF32_CUBLAS_OVERRIDE: None
Try replacing from pydicom._storage_sopclass_uids import SegmentationStorage with from pydicom.uid import SegmentationStorage in segmentation_dataset.py and reader.py within \Lib\site-packages\pydicom_seg. Refer to https://github.com/razorx89/pydicom-seg/issues/60 for more information.
I can confirm that suggestion by BLQNXAY eliminated this particular problem for me.