pythonnet clr is not recognized in jupyter notebook

Viewed 1439

I have installed pythonnet to use clr package for a specific API, which only works with clr in python. Although in my python script (using command or regular .py files) it works without any issues, in jupyter notebook, import clr gives this error, ModuleNotFoundError: No module named 'clr'. Any idea how to address this issue?

2 Answers

Here is simple suggestion: compare sys.path in both cases and see the differences. Your ipython kernel in jupyter is probably searching in different directories than in normal python process.

since you are intended to use clr in jupyter, in jupyter cell, you could also !pip install pythonnet for the first time and every later time if the vm is frequently nuked

Related