-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] : No module named 'pygmtools.c_astar' #92
Comments
Hello! I'm glad to answer your question. We ran the file "plot_deep_image_matching_pytorch.py" in the environment you provided and didn't encounter any bug. The bug you're experiencing is because the dynamic link library for c_astar cannot be found. Could you check if you can find a file similar to c_astar.cpython-38-x86_64-linux-gnu.so in the directory /data/pygm_env/lib/python3.8/site-packages/pygmtools/? If you cannot find the file, you can try reinstalling pygmtools. Additionally, we provide the source code for astar, which is located in the c_astar subfolder of pygmtools. You can navigate to that subfolder and use the following command to generate the .so file. python c_astar_setup.py build_ext --inplace If you're still unable to resolve the issue, please let us know, and we'll be happy to continue assisting you. |
@heatingma ImportError Traceback (most recent call last) File /data/pygmtools/pygmtools/classic_solvers.py:370, in sm(K, n1, n2, n1max, n2max, x0, max_iter, backend) File /data/pygmtools/pygmtools/utils.py:1125, in _check_data_type(input, *args) File /usr/lib/python3.8/importlib/init.py:127, in import_module(name, package) File :1014, in _gcd_import(name, package, level) File :991, in find_and_load(name, import) File :975, in find_and_load_unlocked(name, import) File :671, in _load_unlocked(spec) File :848, in exec_module(self, module) File :219, in _call_with_frames_removed(f, *args, **kwds) File /data/pygmtools/pygmtools/pytorch_backend.py:23 ImportError: cannot import name 'c_astar' from 'pygmtools.c_astar' (unknown location) |
@heatingma after using your suggested command python c_astar_setup.py build_ext --inplace i reinstalled pygmtools again using python -m pip install -e .. Iam able to solve the issue. Hence closing now |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Code to reproduce the behavior:
Expected behavior
Successfully run image matching algorithm
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
python3 -c 'import pygmtools; pygmtools.env_report()'
SciPy 1.10.1
pygmtools 0.4.2
Torch 1.12.1+cu113
Paddle not installed
Jittor not installed``
Additional context
Add any other context about the problem here.
@rogerwwww kindly help
The text was updated successfully, but these errors were encountered: