mit-crpg / OpenMOC

A method of characteristics code for nuclear reactor physics calculations.
https://mit-crpg.github.io/OpenMOC/
Other
149 stars 83 forks source link

ModuleNotFoundError: No module named 'endf' #489

Closed Worfran closed 1 month ago

Worfran commented 1 month ago

I followed the installation process in the quick installation guide, but OpenMC is not recognized as a Python package. When I try to import it using Python in the terminal within the repository on my PC, I get the following error:

$ python

import openmc ModuleNotFoundError: No module named 'endf'

I am new to this type of coding and to using Linux. I would greatly appreciate any help.

image

image

image

GiudGiud commented 1 month ago

you have to add openmc to your PYTHONPATH for python to be able to find it

Worfran commented 1 month ago

Thank you for your help! Since I’m using an Arch Linux distribution, I couldn’t use pip install to install packages system-wide. I tried using pipx, but that didn’t work either. Instead, I created a Python virtual environment and installed the package using pip install, as explained in this issue.