LLNL / LEAP

comprehensive library of 3D transmission Computed Tomography (CT) algorithms with Python and C++ APIs, a PyQt GUI, and fully integrated with PyTorch
https://leapct.readthedocs.io
MIT License
112 stars 11 forks source link

installation problem in Linux #95

Open lsbesley opened 2 months ago

lsbesley commented 2 months ago

Hi,

I get this error when installing throuhg linux. I have tried manual installation and without pytorch installations, but all give this same .egg-info missing error. image

I have the latest versions of Pytorch, cmake, and CUDA. Changing versions did not seem to help.

OS: 6.5.0-26-generic Ubuntu 22.04.4 LTS

kylechampley commented 2 months ago

Hmm, that's weird. The real error message is this one:

The CUDA compiler identification is unknown

Sometimes installing torch messes up CUDA. I would recommend searching that error message. I did and found a few potential solutions. If you are really stuck, you can just use the precompiled LEAP library in the releases section. Download the leapct.so file and then follow the instructions in manual_install.py.

lsbesley commented 2 months ago

okay after downloading the precompiled library, and without installing torch, and copying the libleapct.so file now I get this error image

lsbesley commented 2 months ago

fixed, made a very dirty workaround by redirecting site packages directory, since i was using conda and making it in a venv, which maybe was the problem all along ? and will probably run into further problems. I seem to be able to get manual_install.py to work, but nothing else

kylechampley commented 2 months ago

Sorry for the trouble. Did you get the code to run?

lsbesley commented 2 months ago

While I got manual_setup.py to complete, I dont see any packages installed and running other install files didnt seem to fix the issue

kylechampley commented 2 months ago

OK. There is a foolproof method to get this to work. Try the following: 1) Checkout the LEAP code 2) Download libleapct.so and place it in the src folder of the LEAP git repo 3) Add the full path of this src folder to your PYTHONPATH environment variable.

Instead of item 3 you could also just add the path in a python script like this:

import sys
sys.path.append('path/to/LEAP/src')
from leapctype import *
leapct = tomographicModels()
leapct.about()

That script should print out the version number of other basic information about LEAP. It's a good way to make sure it is working properly.

QuantPrincess commented 1 month ago

Hi, I am currently running into the same issues. I have tried to pip install . this in a conda environment and I seem to be running into exact same trouble (.no-egg info). When I try to manually install with the pre downloaded .so file in the same directory I get the same issue {errno 2} no file or directory found (likely because I am using conda not at the root). I 'm wondering what the work around is? @kylechampley you mentioned putting libleapct.so into the src and changing the pythonpath env variable, but then what do I do to actually install? Do i need to change the dst folder in the manual script to one that points to .conda/envs? Really appreciate your help.

kylechampley commented 1 month ago

Hello @QuantPrincess, would you please retry the pip install, but do it like this:

pip install . -v

and then send me your screen output? Thanks.

QuantPrincess commented 1 month ago

Hi @kylechampley Thanks so much for responding. Here is output :

Screenshot 2024-09-11 at 3 41 16 PM Screenshot 2024-09-11 at 3 41 39 PM
kylechampley commented 1 month ago

It looks like you CUDA compiler cannot be found. Have you installed the CUDA toolkit? Could you run the following command and let me know what it says: nvcc —version

QuantPrincess commented 1 month ago

Yes, it's odd I definitely have CUDA toolkit. Should be 11.8

Screenshot 2024-09-11 at 4 09 23 PM
kylechampley commented 1 month ago

I don't know. You have something wrong with either CUDA or cmake. It does not appear that this is a LEAP-specific problem. If you google "The CUDA compiler identification is unknown" or "Detecting CUDA compiler ABI info" you will see some other people post about this issue which may give you potential solutions.

I recommend you try to compile LEAP yourself, but yes, you can still download the LEAP dynamic library. I see that you asked the question above about using LEAP this way and just adding the sys.path.append(...) command. Yes, you can do it this way and then there is no need to install anything. Have you tried this?

kylechampley commented 1 month ago

I added to new wiki page that explains the manual install process. You can find it here.