c.Parsi
c.Parsi

Reputation: 771

pythonnet clr is not recognized in jupyter notebook

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?

Upvotes: 3

Views: 2180

Answers (2)

willhyper
willhyper

Reputation: 106

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

Upvotes: 0

den.run.ai
den.run.ai

Reputation: 5943

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.

Upvotes: 2

Related Questions