icecube / nuflux

A library for calculating atmospheric neutrino fluxes.
https://docs.icecube.aq/nuflux/main
GNU Lesser General Public License v3.0
15 stars 5 forks source link

Could not build wheels for nuflux #22

Closed samiur06 closed 11 months ago

samiur06 commented 11 months ago

I am trying to install nuflux on cluster. My system: Python 3.8.8 pip 23.2.1 photospline 2.0.7

After running pip3 install --user git+https://github.com/icecube/nuflux on the terminal, I am getting the following error: Could not build wheels for nuflux, which is required to install pyproject.toml-based projects

I also added --no-binary :all: prefix in my command, but came with the same error. What else can I do to install it? (I want to avoid building it from scratch, as I already tried it and faced several other dependency issues that are messy to resolve as cluster user.)

samiur06 commented 11 months ago

I have attached the error output that contains the details nuflux.txt. There are a few packages that are ignored in the installation process. Note that I am trying to install it on cluster.

austinschneider commented 11 months ago

Looks like there is an issue with it finding photospline. Is photospline already installed on the system you're using, or do you have any other information about your environmental setup?

samiur06 commented 11 months ago

Primarily, I couldn't install photospline with conda install -c conda-forge photospline which had given multiple errors due to gcc version and CXXFLAGS, and CMake. Later the people, who handle the HPC, resolved the issue with installation (I am not exactly sure how they did it).

Currently, this is the location of photospline that shows up at the prompt: >>> import photospline; print(photospline.__file__) /opt/anaconda3/2021.05/lib/python3.8/site-packages/photospline.so

kjmeagher commented 11 months ago

you need to find the location of libphotospline.so and set the environment variable PREFIX such that ${PREFIX}/lib/libphotospline.so is found

samiur06 commented 11 months ago

Did you mean the location of photospline.so instead of libphotospline.so? Because that's the filename I found running import photospline; print(photospline.__file__) in python. It is on the /opt/anaconda3/2021.05/lib/python3.8/site-pachages directory, not on any lib directory.

kjmeagher commented 11 months ago

python3.8/site-pachages/photospline.so is the python binding, nuflux doesn't care about that. You need to find the c/c++ shared object that nuflux links against

samiur06 commented 11 months ago

I found the location of libphotospline.so, and now I could install nuflux. Thanks for all the help! :)