Project-MONAI / Project-MONAI/MONAILabel

Monailabel cann't run correctly in windows 11

Open
#1,794 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
891
Forks
269
Avg merge
15h 41m
Merged PRs (30d)
1

Description

Discussed in https://github.com/Project-MONAI/MONAILabel/discussions/1793

Originally posted by Xu-Charles December 10, 2024
I have python 3.9.20 environment with PyTorch and CUDA installed.
cuda version :12.4

(monailabel) C:\Users\Administrator>python
Python 3.9.20 (main, Oct 3 2024, 07:38:01) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import torch
print(torch.cuda.is_available())
True

But, I get the following error when running monailabel:

(monailabel) C:\Users\Administrator>monailabel
Using PYTHONPATH=C:\ProgramData\Anaconda3\envs;
""
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\monailabel\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,

File "C:\ProgramData\Anaconda3\envs\monailabel\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)

File "C:\ProgramData\Anaconda3\envs\monailabel\lib\site-packages\monailabel\main.py", line 24, in
from monailabel.config import settings

File "C:\ProgramData\Anaconda3\envs\monailabel\lib\site-packages\monailabel\config.py", line 23, in
class Settings(BaseSettings):

File "C:\ProgramData\Anaconda3\envs\monailabel\lib\site-packages\monailabel\config.py", line 109, in Settings
if is_package_installed("SAM-2")

File "C:\ProgramData\Anaconda3\envs\monailabel\lib\site-packages\monailabel\config.py", line 20, in is_package_installed
return name in sorted(x.name for x in distributions())

File "C:\ProgramData\Anaconda3\envs\monailabel\lib\site-packages\monailabel\config.py", line 20, in
return name in sorted(x.name for x in distributions())

AttributeError: 'PathDistribution' object has no attribute 'name'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported Windows 11 failure in the stated Python environment, then inspect monailabel/config.py around is_package_installed and the distributions() call shown in the traceback. Confirm that the MONAI Label startup path in monailabel/main.py completes without the reported AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
backend, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.