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

cannot create regular file '/usr/lib/libmultinest_mpi.so': Permission denied #249

Closed Nandini-ESO closed 6 months ago

Nandini-ESO commented 7 months ago

Cloning into 'MultiNest'... remote: Enumerating objects: 549, done. remote: Counting objects: 100% (118/118), done. remote: Compressing objects: 100% (98/98), done. remote: Total 549 (delta 65), reused 49 (delta 19), pack-reused 431 Receiving objects: 100% (549/549), 300.02 KiB | 5.17 MiB/s, done. Resolving deltas: 100% (342/342), done. /home/nandini/MultiNest/build /home/nandini/MultiNest/build CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at src/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

... cp: cannot create regular file '/usr/lib/libmultinest_mpi.so': Permission denied cp: cannot create regular file '/usr/lib/libmultinest_mpi.so.3.10': Permission denied cp: cannot create regular file '/usr/lib/libmultinest.so': Permission denied cp: cannot create regular file '/usr/lib/libmultinest.so.3.10': Permission denied

JohannesBuchner commented 7 months ago

Dear @Nandini-ESO,

I am maintaining the Python program pymultinest, but the Fortran program Multinest is not a program I wrote. I help other researchers in my free time, but this should not be an expectation you have of me. If you do want my help, it would be polite to say hello first and ask for help. Describe what you are trying to do, and include as much information as possible, such as your operating system, the command you ran and the instructions page you are trying to follow. Then you can say what you tried to solve your problem so far, for example when entering the error message and the command into Google.

Cheers, Johannes

Nandini-ESO commented 7 months ago

Dear Johannes,

I totally understand your point about the importance of a proper hello before diving into questions – my bad on that one. It seems like there might have been a mix-up on my end. I wrote a decent message explaining what I needed help with, but it seems like only my issues got through. Apologies for the inconvenience and confusion there.

I'm working on this project that involves using PyMultinest and PyCuba. I'm using linux - ubuntu. I used the commands below from the documentation (https://johannesbuchner.github.io/PyMultiNest/install) $ git clone https://github.com/JohannesBuchner/PyMultiNest/ $ cd PyMultiNest $ python setup.py install

tried building the libraries as well, following the instructions from the same page

git clone https://github.com/JohannesBuchner/MultiNest cd MultiNest/build cmake .. make

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

$ export LD_LIBRARY_PATH=$HOME/Downloads/MultiNest/lib:$HOME/Downloads/cuba/directory/:$LD_LIBRARY_PATH

this command gives no error, but fails when I import the libraries: ($ python -c 'import pymultinest', $ python -c 'import pycuba') (I don't have the error message, what I got for that then)

later I tried commands from tutorial we used during the workshop to install the package (https://github.com/esedagha/petitRADTRANS/blob/main/petitRADTRANS_ATMO2021_Tutorial.ipynb) below are the commands i used for my device:

!git clone https://github.com/JohannesBuchner/MultiNest.git %cd /home/nandini/MultiNest/build !pwd !cmake .. !make !cp /home/nandini/MultiNest/lib/* /usr/lib/

it still gives me error: Cloning into 'MultiNest'... remote: Enumerating objects: 549, done. remote: Counting objects: 100% (118/118), done. remote: Compressing objects: 100% (98/98), done. remote: Total 549 (delta 65), reused 49 (delta 19), pack-reused 431 Receiving objects: 100% (549/549), 300.02 KiB | 5.17 MiB/s, done. Resolving deltas: 100% (342/342), done. /home/nandini/MultiNest/build /home/nandini/MultiNest/build CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at src/CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

... cp: cannot create regular file '/usr/lib/libmultinest_mpi.so': Permission denied cp: cannot create regular file '/usr/lib/libmultinest_mpi.so.3.10': Permission denied cp: cannot create regular file '/usr/lib/libmultinest.so': Permission denied cp: cannot create regular file '/usr/lib/libmultinest.so.3.10': Permission denied

I tried making new user on my device and trying installing it with other things but no luck so far.

Can you help me fix this? Thanks in advance!

Kind regards, Nandini

JohannesBuchner commented 7 months ago

/usr/lib/ is only writeable by root, you need sudo before cp

JohannesBuchner commented 7 months ago

what does python -c 'import pymultinest' give if you before that point LD_LIBRARY_PATH to the directory where the MultiNest .so file is (should be /home/nandini/MultiNest/lib/)?

Nandini-ESO commented 6 months ago

what does python -c 'import pymultinest' give if you before that point LD_LIBRARY_PATH to the directory where the MultiNest .so file is (should be /home/nandini/MultiNest/lib/)?

I don't have those commands at the moment, it turned out some problem was due to my linux system.

/usr/lib/ is only writeable by root, you need sudo before cp This helped me after the new system setup and update.

Thank you so much!!