masadcv / FastGeodis

Fast Implementation of Generalised Geodesic Distance Transform for CPU (OpenMP) and GPU (CUDA)
https://fastgeodis.readthedocs.io
BSD 3-Clause "New" or "Revised" License
90 stars 14 forks source link

IMPORT ERROR: undefined symbol #39

Closed MalikTeng closed 1 year ago

MalikTeng commented 1 year ago

Describe the bug Hi, I have the following error when trying to import FastGeodis for my project,

` Exception has occurred: ImportError

/home/***/anaconda3/envs/torch/lib/python3.9/site-packages/FastGeodisCpp.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops5zeros4callEN3c108ArrayRefINS2_6SymIntEEENS2_8optionalINS2_10ScalarTypeEEENS6_INS2_6LayoutEEENS6_INS2_6DeviceEEENS6_IbEE

File "/home//Documents//model/networks.py", line 40, in

import FastGeodis

File "/home//Documents//run_***.py", line 55, in

from model.networks import *

File "/home//Documents//main.py", line 81, in

from run_*** import *

ImportError: /home/***/anaconda3/envs/torch/lib/python3.9/site-packages/FastGeodisCpp.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops5zeros4callEN3c108ArrayRefINS2_6SymIntEEENS2_8optionalINS2_10ScalarTypeEEENS6_INS2 `

Desktop

Environment

Additional context I have the same issue when trying to compile the cpp and cu files locally.

MalikTeng commented 1 year ago

Issue fixed by creating another virtual environment with python 3.8.*.

Not sure particularly what's going wrong.

masadcv commented 1 year ago

It seems the issue is related to your setup. Can you try again with a new python3.9 virtual environment?

Since the issue was reported as fixed, I am closing this. Feel free to reopen if issue persists.