You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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'
The text was updated successfully, but these errors were encountered:
The issue is not that you use Windows11 but that you use Python-3.9.
I have run into the same issue. The problem was easy to fix (just use get method and tweak the sorting), but then when I noticed that there were further issues (SAM is not supported on Python 3.9) then I just gave up.
The error happens when you import MONAILabel, so it seems MONAILabel is not tested at all with Python-3.9 (or the failure is ignored), so I'm not sure if MONAILabel is supported on Python-3.9.
Discussed in #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.
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'
The text was updated successfully, but these errors were encountered: