Comments (6)
My best guess is that the install failed. Could you send me the full traceback?
from leap.
My best guess is that the install failed. Could you send me the full traceback?
I followed the instructions here.
import leaptorch
Error: could not find LEAP dynamic library at
/home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages/libleap.so
or
/home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages/../build/lib/libleap.so
Traceback (most recent call last):
File "", line 1, in
File "/home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages/leaptorch.py", line 13, in
lct = tomographicModels()
File "/home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages/leapctype.py", line 137, in init
self.param_id = self.create_new_model()
File "/home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages/leapctype.py", line 149, in create_new_model
self.libprojectors.create_new_model.restype = ctypes.c_int
AttributeError: 'NoneType' object has no attribute 'create_new_model'
And the leapctype could be imported.
from leap.
Yep, it looks like dynamic library failed to compile. A couple of things to check
- Do you have all the dependencies met? They are listed here: https://github.com/LLNL/LEAP/wiki/Installing-and-Using-LEAP
- Trying running the following command which should print out all the compilation errors: pip install -v .
- I precompiled the dynamic libraries for version 1.0, you can just download them here: https://github.com/LLNL/LEAP/releases
- One common error in the compilation is a CMake error. A change that helped another user is listed here: #9 (comment)
from leap.
Yep, it looks like dynamic library failed to compile. A couple of things to check
- Do you have all the dependencies met? They are listed here: https://github.com/LLNL/LEAP/wiki/Installing-and-Using-LEAP
- Trying running the following command which should print out all the compilation errors: pip install -v .
- I precompiled the dynamic libraries for version 1.0, you can just download them here: https://github.com/LLNL/LEAP/releases
- One common error in the compilation is a CMake error. A change that helped another user is listed here: encountered an error while running the demo #9 (comment)
I reinstalled the leap and encountered the same error in import leaptorch.
It seems that the installation is complete:
(py39) jp_peng@sn4622118213:~/Documents/DECBCT_unsup/LEAP$ pip install -v .
Using pip 23.3.1 from /home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages/pip (python 3.9)
Processing /home/jp_peng/Documents/DECBCT_unsup/LEAP
Running command python setup.py egg_info
./etc/build.sh: 13: cmake: not found
/home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages/setuptools/dist.py:498: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!******************************************************************************** Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead. This deprecation is overdue, please update your project and remove deprecated calls to avoid build errors in the future. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details. ********************************************************************************
!!
opt = self.warn_dash_deprecation(opt, section)
running egg_info
creating /tmp/pip-pip-egg-info-96dd29l4/leapct.egg-info
writing /tmp/pip-pip-egg-info-96dd29l4/leapct.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-96dd29l4/leapct.egg-info/dependency_links.txt
writing requirements to /tmp/pip-pip-egg-info-96dd29l4/leapct.egg-info/requires.txt
writing top-level names to /tmp/pip-pip-egg-info-96dd29l4/leapct.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-96dd29l4/leapct.egg-info/SOURCES.txt'
reading manifest file '/tmp/pip-pip-egg-info-96dd29l4/leapct.egg-info/SOURCES.txt'
writing manifest file '/tmp/pip-pip-egg-info-96dd29l4/leapct.egg-info/SOURCES.txt'
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in /home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages (from leapct==1.0) (1.26.3)
Requirement already satisfied: torch in /home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages (from leapct==1.0) (2.1.2)
Requirement already satisfied: filelock in /home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages (from torch->leapct==1.0) (3.13.1)
Requirement already satisfied: typing-extensions in /home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages (from torch->leapct==1.0) (4.9.0)
Requirement already satisfied: sympy in /home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages (from torch->leapct==1.0) (1.12)
Requirement already satisfied: networkx in /home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages (from torch->leapct==1.0) (3.1)
Requirement already satisfied: jinja2 in /home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages (from torch->leapct==1.0) (3.1.2)
Requirement already satisfied: fsspec in /home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages (from torch->leapct==1.0) (2023.12.2)
Requirement already satisfied: MarkupSafe>=2.0 in /home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages (from jinja2->torch->leapct==1.0) (2.1.3)
Requirement already satisfied: mpmath>=0.19 in /home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages (from sympy->torch->leapct==1.0) (1.3.0)
Building wheels for collected packages: leapct
Running command python setup.py bdist_wheel
./etc/build.sh: 13: cmake: not found
/home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages/setuptools/dist.py:498: SetuptoolsDeprecationWarning: Invalid dash-separated options
!!******************************************************************************** Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead. This deprecation is overdue, please update your project and remove deprecated calls to avoid build errors in the future. See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details. ********************************************************************************
!!
opt = self.warn_dash_deprecation(opt, section)
running bdist_wheel
running build
running build_py
creating build/lib
copying src/leaptorch.py -> build/lib
copying src/leapctype.py -> build/lib
/home/jp_peng/.conda/envs/py39/lib/python3.9/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!******************************************************************************** Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ********************************************************************************
!!
self.initialize_options()
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
copying build/lib/leapctype.py -> build/bdist.linux-x86_64/wheel
copying build/lib/leaptorch.py -> build/bdist.linux-x86_64/wheel
running install_egg_info
running egg_info
creating src/leapct.egg-info
writing src/leapct.egg-info/PKG-INFO
writing dependency_links to src/leapct.egg-info/dependency_links.txt
writing requirements to src/leapct.egg-info/requires.txt
writing top-level names to src/leapct.egg-info/top_level.txt
writing manifest file 'src/leapct.egg-info/SOURCES.txt'
reading manifest file 'src/leapct.egg-info/SOURCES.txt'
writing manifest file 'src/leapct.egg-info/SOURCES.txt'
Copying src/leapct.egg-info to build/bdist.linux-x86_64/wheel/leapct-1.0-py3.9.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/leapct-1.0.dist-info/WHEEL
creating '/tmp/pip-wheel-bqy16jhg/leapct-1.0-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'leapctype.py'
adding 'leaptorch.py'
adding 'leapct-1.0.dist-info/METADATA'
adding 'leapct-1.0.dist-info/WHEEL'
adding 'leapct-1.0.dist-info/top_level.txt'
adding 'leapct-1.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Building wheel for leapct (setup.py) ... done
Created wheel for leapct: filename=leapct-1.0-py3-none-any.whl size=27450 sha256=07f591e9b39a67899ee488b51c5ddf5241af41d4205d4b2651735f4b242e8cbc
Stored in directory: /tmp/pip-ephem-wheel-cache-8vgl3igw/wheels/0e/f9/1b/fe1249fe8768085c66444dc1f522370c4ea10bfba6fd055a76
Successfully built leapct
Installing collected packages: leapct
Successfully installed leapct-1.0
from leap.
Unfortunately, it always says "Successfully installed leapct..." even though it is not successful.
Anyway, if you look at the output you posted you can see that it says "./etc/build.sh: 13: cmake: not found"
For some reason your system cannot find cmake. This is what is causing your issues and you'll have to resolve this. Again, you can always use the precompiled library if you are still having trouble.
from leap.
Unfortunately, it always says "Successfully installed leapct..." even though it is not successful.
Anyway, if you look at the output you posted you can see that it says "./etc/build.sh: 13: cmake: not found"
For some reason your system cannot find cmake. This is what is causing your issues and you'll have to resolve this. Again, you can always use the precompiled library if you are still having trouble.
Thanks for your help! I reinstalled cmake and leapct, seems working now.
from leap.
Related Issues (20)
- cbct post processing HOT 8
- I want specific descriptions about some sub-functions on the tomographicModels HOT 3
- Volume coordination HOT 2
- Pytorch optimization through FBP HOT 2
- Compile error No cuda toolset found HOT 3
- Questions about rebin function used in the curved detector HOT 12
- Angular range problem HOT 2
- Support AAPM low-dose CT helical reconstruction HOT 3
- Failed installation on window HOT 6
- Error when building on Windows@AMD HOT 5
- Can't use libleapct.dll wheninstalled manually on Windows HOT 1
- Oblique CT supporting HOT 8
- Help me: Offsetscan HOT 44
- LEAP installation Issue HOT 3
- .
- remove cone-beam artifacts HOT 2
- Simulated fan-beam limited-angle reconstruction HOT 8
- Detector rotation functions for three cases(skew, tilt, rolling) HOT 10
- long height sample case with leap's function HOT 2
- Will the LEAP add more iterative algorithms like TIGRE? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leap.