Problem executing OpenMc example

Hello everyone,
I am new to OpenMC and I have installed it using Mamba and conda-forge on linux (ubuntu).
I tried to launch the OpenMC examples (Pincell and Lattice …) but I keep having this Error while trying to generate the xml files:

settings_file.source = openmc.IndependentSource(space=uniform_dist)^^^^^^^^^^^^^
AttributeError: module ‘openmc’ has no attribute ‘IndependentSource’

Any help would appreciated ! Thank you in advance

I also just installed OpenMC using conda and mamba, and have the same issue (also with the “assembly” example).

IndependentSource has just been introduced in the develop branch of openmc. This will be released at some point via conda. Until then the version on conda (0.13.3) uses Source instead of IndependentSource.

2 Likes

Thank you for your answer, I changed IndependentSource by Source in the build_xml.py example and it works.

1 Like