OPENMC has no attribute 'Material'

Hi! I was trying OpenMC version 12 which was installed using miniconda in ubuntu 20.04 LTS. I used JupyterLab for writing the code. The “import openmc” command ran successfully but when I tried to create material instances using openmc.Material(), it resulted in an error and displayed openmc has no attribute “Material”. Is there any solution to this regard? Thank you!

One possibility is that you have a subdirectory named ‘openmc’ in the directory where you are running JupyterLab from. If this is the case, Python will import the directory as a namespace, rather than the OpenMC Python module itself. I would try running JupyterLab from a different directory or making sure there is no openmc subdirectory there and see if that resolves the issue.