PyMultiNest icon indicating copy to clipboard operation
PyMultiNest copied to clipboard

Installation instructions

Open JohannesBuchner opened this issue 4 years ago • 2 comments

The installation instructions should be consolidated for MacOS and Linux users to here:

https://johannesbuchner.github.io/PyMultiNest/install.html

TODO:

  • mention MPI installation instructions
  • collect MacOS-related instructions from issues
  • conda install
  • docker install

JohannesBuchner avatar Jul 29 '19 18:07 JohannesBuchner

Hi There,

I'm trying to install pycuba/cuba in a conda environment and I'm not getting it.

I was able to easily install pymultinest with conda install -c conda-forge pymultinest. The demo pymultinest_demo.py works fine.

Then, I I installed Cuba via conda install -c jcgoran libcuba. But when I run the pycuba_demo, I got the ModuleNotFoundError: No module named 'pycuba' error.

Do you have any tips on how to make cuba/pycuba work with conda environment?

patricia-ternes avatar Sep 15 '22 18:09 patricia-ternes

I never tried this. Can you look in your conda python site-packages directory if pycuba is there?

JohannesBuchner avatar Sep 15 '22 20:09 JohannesBuchner

Hi, to successfully use PyMultinest on macOS M1, I had to add two steps to the installation.

First, I used a conda environment but had to make sure I built it under an osx-arm64 (arm64) architecture. I followed this issue).

Second, in order for my environment to find the libraries to run PyMultinest, which I installed by cloning the GitHub repository, I had to install Multinest which I did following the instructions and then I had to copy the multinest/lib files onto my environment, which worked by doing:

cp -v ~/your_path/MultiNest/lib/* /your_path/opt/anaconda3/envs/emy_environment/lib/

Could be worth to add these to the installation instructions to save some time for future users :)

Palma-Bifani avatar Mar 07 '24 12:03 Palma-Bifani

@Palma-Bifani Hi, I'm trying to install pymultinest and multinest on macOS and I'm also trying to do it so it's contained in a conda environment. Would you kindly mind detailing your steps a little more?

By default, my conda environment is arm64 so not a problem. before creating the environment, I installed all the necessary dependencies using brew, e.g.

brew install gcc cmake atlas open-mpi

this is environment independent as brew doesnt installs on the system-wide if I am understanding correctly. Also I believe lapack and blas are already included in Mac so no need to install again with brew.

Then I created a conda environment and did,

pip3 install scipy numpy matplotlib mpi4py matplotlib

as written on the pages.

now, as for installation of pymultinest and multinest, I am unsure how to use git clone to make sure these are done inside the conda environment ? do I install these outside my conda environment or within it and then git clone? will that contain them in the environment itself?

also, what did you add to your path variable to indicate you are using the environment?

I would appreciate any guidance! thank you!

shruti-ramaiya avatar Mar 09 '24 14:03 shruti-ramaiya

pymultinest is already on conda: https://anaconda.org/conda-forge/pymultinest

if that does not work for you, activate your conda environment, (conda) install the dependencies, then do the build steps.

JohannesBuchner avatar Mar 10 '24 10:03 JohannesBuchner

I did try this method but it said pymultinest package not available - I will retry building it from source, thanks

shruti-ramaiya avatar Mar 10 '24 11:03 shruti-ramaiya

If conda install failed, create an issue on https://github.com/conda-forge/pymultinest-feedstock . Include the command and error message.

JohannesBuchner avatar Mar 10 '24 17:03 JohannesBuchner