JohannesBuchner / PyMultiNest

Pythonic Bayesian inference and visualization for the MultiNest Nested Sampling Algorithm and PyCuba's cubature algorithms.
http://johannesbuchner.github.io/PyMultiNest/
Other
194 stars 88 forks source link

ModuleNotFoundError #248

Open SreelakshmiChakyar opened 7 months ago

SreelakshmiChakyar commented 7 months ago

I installed pymultinest using 'conda install conda-forge::pymultinest' but when I try to import pymultinest it shows an error as given below. $$ python Python 3.8.8 (default, Apr 13 2021, 19:58:26) [GCC 7.3.0] :: Anaconda, Inc. on linux

import pymultinest Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'pymultinest' exit()

However, my system shows the pymultinest files as I search

$$ find ./ -name "pymultinest*" -print ./anaconda3/pkgs/pymultinest-2.12-pyh707e725_0.conda ./anaconda3/pkgs/pymultinest-2.12-pyh707e725_0 ./anaconda3/pkgs/pymultinest-2.12-pyh707e725_0/site-packages/pymultinest-2.12.dist-info ./anaconda3/pkgs/pymultinest-2.12-pyh707e725_0/site-packages/pymultinest ./anaconda3/conda-meta/pymultinest-2.12-pyh707e725_0.json

Initially, when I installed pymultinest the error was "Could not load MultiNest library: libgfortran.so.3". To solve that I uninstalled pymultynest, installed gfortran separately, and then reinstalled as mentioned above using conda.

Can you please help me to sort this out?

JohannesBuchner commented 7 months ago

what is sys.path?

You can also try deleting anaconda and reinstalling it.

SreelakshmiChakyar commented 7 months ago

Hi, Meanwhile, I did some reinstallations now the old error is showing again

ERROR: Could not load MultiNest library: libgfortran.so.3 ERROR: You have to build MultiNest, ERROR: and point the LD_LIBRARY_PATH environment variable to it! ERROR: manual: https://johannesbuchner.github.io/PyMultiNest/install.html

problem: libgfortran.so.3: cannot open shared object file: No such file or directory

is there any way to sort this out?

sys.path result is

['', '/home/sreepchakyar/anaconda3/lib/python38.zip', '/home/sreepchakyar/anaconda3/lib/python3.8', '/home/sreepchakyar/anaconda3/lib/python3.8/lib-dynload', '/home/sreepchakyar/anaconda3/lib/python3.8/site-packages', '/home/sreepchakyar/anaconda3/lib/python3.8/site-packages/locket-0.2.1-py3.8.egg']

Should I have to reinstall anaconda? And one more thing to mention, I am using the institute cluster, not my system. Thanks

JohannesBuchner commented 7 months ago

yes

JohannesBuchner commented 7 months ago

and maybe ask your cluster admins for advice, they will know the system best

SreelakshmiChakyar commented 7 months ago

Thanks for suggestions and I will contact the cluster admins for more details about the system.