Numpy not found error

I installed openmc from source on Linux (Ubuntu 20.04.4) and am trying to use a separate package with it, called “openmc-plasma-source,” but when I try and run the sample script from its github I get this:

ModuleNotFoundError: No module named ‘numpy’

Does anyone know why this is happening? I’ve run pip install numpy and it says that I have numpy installed. I’m currently using vscode as my IDE.

I hear that openmc-plasma-source is a great little package for making fusion plasma sources for openmc :wink:

I think in this case the error is not related to openmc or the plasma source package but more related to the use of python enviroments

I think what might be happening is the VScode python environment might be different to the python environment you are installing packages into

I include two screen shots, the first one where I load up vs code and reproduce the same error of not finding numpy and the second screen shot where I’ve selected a different python environment using the button circled in the low right. In the second example the python environment has numpy and runs the code.

1 Like

Thank You! Newbie mistake, sorry.

@Shimwell At present I am in the second image. But I am facing runtime error for not having the Data Library. But I am unable to install it. Please help.

@Nilormi could you post a screen shot of the error please, I’m not sure this is the same problem as the rest of this thread.

@Shimwell yes sure.

I did also try pip install openmc_data_downloader but it didn’t work.

ok let us have a quick catch up on the gather town and see if we can solve this.

When do you want to have the meeting?

are you free now :slight_smile:

Yes absolutely. Thank you very much. Shall I join using the mothly meeting link?

yep just join via this link Gather