Skip to content
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

problem for importing monai #5171

Closed
mfarhadirad opened this issue Sep 18, 2022 · 3 comments
Closed

problem for importing monai #5171

mfarhadirad opened this issue Sep 18, 2022 · 3 comments

Comments

@mfarhadirad
Copy link

mfarhadirad commented Sep 18, 2022

hello everybody
I'm trying to use monai but when I import it this error shows up.
"The kernel appears to have died. It will restart automatically."

I have installed it using pip install monai. and I'm using python 3.9.12.

when I use jupyter notebook extension in VS code this error shows up.
"Canceled future for execute_request message before replies were done
The Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure. Click here for more info. View Jupyter log for further details."

this happens even when I just write "import monai"

@KumoLiu
Copy link
Contributor

KumoLiu commented Sep 19, 2022

Hi @mersad95zd, since Jupyter Kernels can crash for many reasons that I can't exactly tell why you're having this problem. So maybe using pip install 'monai[all]' installs all the optional dependencies. Refer to: https://docs.monai.io/en/latest/installation.html#installing-the-recommended-dependencies. And maybe downgrade your Python version to 3.8.13.
Hope it can help you!
Thanks!

@mfarhadirad
Copy link
Author

mfarhadirad commented Sep 19, 2022

Hi, KumoLiu thanks for your answer.
I have used this code and it is almost fixed.

import os
os.environ['KMP_DUPLICATE_LIB_OK']='True'
import monai

@wyli wyli closed this as completed Sep 19, 2022
@Ihssene-Brahimi
Copy link

Thank you so much @mfarhadirad it worked awesome!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants