FileNotFoundError: [Errno 2] No such file or directory: 'openmc'

Dear all,

Does anyone know what happened with this and what should I do?

Thx,
Nurul

@NurulPutriRohmadhani, Can you elaborate on your problem a little bit?

The easiest way to fix is to use the full, absolute path, instead of a relative path.

When I ran the example modeling a pincell, I tried to find the neutron flux by adding the following code. when running openmc.run (), the output looks like that.

I have met this kind of question before, maybe you can run the command “vi ~/.bashrc” in the terminal, after that ,we may give you some advice about your problem about environment path.(I think it is still the problem of environment)
the second advice is that since you can run the “import openmc command”, maybe the environment path is no problem(I haven’t seen the problem like that)
good luck

Looks like the kernel appears to have died. Did you restart your jupyter kernel @NurulPutriRohmadhani? You can restart your Jupyter Kernel by simply clicking Kernel > Restart & Run All from the Jupyter menu.

@NurulPutriRohmadhani When you run the openmc.run function, it will try to call the openmc executable as a subprocess. The error you are seeing is happening because it’s not able to find an openmc executable anywhere. You should double check your installation to make sure that the openmc executable was installed somewhere on your PATH.