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

wsl can be installed multinest? #215

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hello, Can the virtual environment created by WSL(Windows subsystem for Linux) install the multinest library?

JohannesBuchner commented 2 years ago

I don't know.

ghost commented 2 years ago

Okay, excuse me

JohannesBuchner commented 2 years ago

If you figure it out, please post here

ghost commented 2 years ago

Multinest, Cuba has been successfully installed in WSL! step:

sudo apt-get install python3-scipy,
sudo apt-get install python3-numpy,
sudo apt-get install python3-matplotlib
sudo apt-get install python3-progressbar
sudo apt-get install python3-ipython
sudo apt-get install libblas3
sudo apt-get install libblas-dev
sudo apt-get install liblapack3
sudo apt-get install liblapack-dev
sudo apt-get install libatlas3-base

sudo apt-get install libatlas-devchange to sudo apt-get install libatlas-base-dev

sudo apt-get install  cmake
sudo apt-get install build-essential 
sudo apt-get install git
sudo apt-get install gfortran
git clone https://github.com/JohannesBuchner/MultiNest
cd MultiNest/build
cmake ..
make

git clone https://github.com/JohannesBuchner/cuba/
cd cuba
./configure
./makesharedlib.sh

$  cp -v ~/MultiNest/lib/lib* ~/miniconda3/envs/fermi3ML/lib
$ export LD_LIBRARY_PATH=$HOME/path/to/your/installed/MultiNest/lib:$HOME/path/to/your/installed/cuba/directory/:$LD_LIBRARY_PATH

Test importing the libraries:

$ python -c 'import pymultinest'
$ python -c 'import pycuba'

image

JohannesBuchner commented 2 years ago

Nice!

ghost commented 2 years ago

But it's strange that I installed multinest version 3.10 instead of 3.12