-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monailabel cann't run correctly in windows 11 #1794
Comments
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. |
Try: |
is all good? |
If it helps at all, for me, with Python-3.9 MONAILabel failed on this line: MONAILabel/monailabel/config.py Line 20 in 1fe0e8f
I've tried installing various
(It seems that I removed the sorting, I don't know why, maybe that was causing some issue, too, and you probably don't really need the sorting anyway) Since then I decided to switch to Python-3.10, so I did not investigate Python-3.9 any further. |
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: