Open zixinglin07 opened 1 year ago
Update:
By moving the cpu.py file from another torch-encoding folder within the site-packages into the "encoding" folder, the error is gone and normal import of encoding works with no errors.
However when trying to include the encoding library into my project, the same line causes a different ImportError error:
File "/home/zixing/anaconda3/envs/lseg1/lib/python3.7/site-packages/encoding/functions/encoding.py", line 15, in <module>
from encoding import cpu
ImportError: /home/zixing/anaconda3/envs/lseg1/lib/python3.7/site-packages/encoding/cpu.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZNSt15__exception_ptr13exception_ptr9_M_addrefEv
I also tried using Python 3.6, but the same error occurs, with cpu.cpython-36m-x86_64-linux-gnu.so instead.
Hi, I am trying to use encoding in my python project, however whenever I want to import encoding, or it's relevant modules I am met with an ImportError, just in the following example:
The same error is present when I run the following import:
from encoding.models.sseg import BaseNet
I am running Ubuntu 22.04.2 on VM and I have installed Pytorch-Encoding using the suggested command "pip install git+https://github.com/zhanghang1989/PyTorch-Encoding/"
A couple of potential issues come to mind:
I look forward to any form of assistance or clarification so as to help me better understand my situation and try to resolve it. Thank you!