Installation issue - pkgutil subprocess error
bahadarbhatia opened this issue · 7 comments
Using Python v3.11 and v3.12 I get a pkugutil subprocess error:
pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [58 lines of output]
Collecting setuptools
Using cached setuptools-69.0.3-py3-none-any.whl.metadata (6.3 kB)
Collecting numpy==1.22.0
Using cached numpy-1.22.0.zip (11.3 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.
exit code: 1
[33 lines of output]
Traceback (most recent call last):
File "C:\Program Files\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Program Files\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 112, in get_requires_for_build_wheel
backend = _build_backend()
^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 77, in _build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\importlib\__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 994, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "C:\Users\XXX\AppData\Local\Temp\pip-build-env-3bn4w_t1\overlay\Lib\site-packages\setuptools\__init__.py", line 16, in <module>
import setuptools.version
File "C:\Users\XXX\AppData\Local\Temp\pip-build-env-3bn4w_t1\overlay\Lib\site-packages\setuptools\version.py", line 1, in <module>
import pkg_resources
File "C:\Users\XXX\AppData\Local\Temp\pip-build-env-3bn4w_t1\overlay\Lib\site-packages\pkg_resources\__init__.py", line 2172, in <module>
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
Hi @bahadarbhatia,
Can you please try installing MONAI Label on a fresh Python env using version 3.9 or 3.10?
We still need to update a couple of things for Python v3.11: #1569
Let us know
Hi @bahadarbhatia,
Thanks for the update. Have you tried using the MONAI Label Docker container: https://hub.docker.com/r/projectmonai/monailabel
More instructions here: https://github.com/Project-MONAI/MONAILabel?tab=readme-ov-file#development-version
Everything you need to start the MONAI Label server is packaged in this Docker container.
Let us know,
You are using python 3.12.. this version is not supported or verified for monai or Monai label..
I suggest you try 3.8, 3.9.. I think 3.10 should work as well..
Refer: https://docs.monai.io/projects/label/en/latest/installation.html#prerequisites
This might help to fix an issue with higher python versions.. there are bunch of suggestions on how to fix something similar..
Hi, The feedback from our hospital IT team was that they do not support the use of docker/containers within the environment. Please update when this python issue is resolved, and we will take it from there. Kind regards, Bahadar From: Andres Diaz-Pinto @.> Sent: Tuesday, February 13, 2024 5:36 PM To: Project-MONAI/MONAILabel @.> Cc: BHATIA, Bahadar (SANDWELL AND WEST BIRMINGHAM HOSPITALS NHS TRUST) @.>; Mention @.> Subject: Re: [Project-MONAI/MONAILabel] Installation issue - pkgutil subprocess error (Issue #1631) You don't often get email from @.@.>. Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification This message originated from outside of NHSmail. Please do not click links or open attachments unless you recognise the sender and know the content is safe. Hi @bahadarbhatiahttps://github.com/bahadarbhatia, Thanks for the update. Have you tried using the MONAI Label Docker container: https://hub.docker.com/r/projectmonai/monailabel More instructions here: https://github.com/Project-MONAI/MONAILabel?tab=readme-ov-file#development-version Everything you need to start the MONAI Label server is packaged in this Docker container. Let us know, - Reply to this email directly, view it on GitHub<#1631 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BFXWH767WAX33R7DEFEOPLLYTOQBDAVCNFSM6AAAAABC5VMJ56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBSGA3TIMBRGI. You are receiving this because you were mentioned.Message ID: @.@.>> ************************************************************************************** ****************************** This message may contain confidential information. If you are not the intended recipient please: i) inform the sender that you have received the message in error before deleting it; and ii) do not disclose, copy or distribute information in this e-mail or take any action in relation to its content (to do so is strictly prohibited and may be unlawful). Thank you for your co-operation. NHSmail is the secure email, collaboration and directory service available for all NHS staff in England. NHSmail is approved for exchanging patient data and other sensitive information with NHSmail and other accredited email services. For more information and to find out how you can switch visit Joining NHSmail - NHSmail Supporthttps://support.nhs.net/article-categories/joining-nhsmail/
Hi @bahadarbhatia,
Just verified the MONAI Label in Python versions 3.10 and 3.11 and it is working fine. Could you please check on your end and let us know?