Skip to content
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

undefined symbol: THPVariableClass #46

Open
mhnasseri opened this issue Oct 15, 2021 · 0 comments
Open

undefined symbol: THPVariableClass #46

mhnasseri opened this issue Oct 15, 2021 · 0 comments
Labels
question Further information is requested

Comments

@mhnasseri
Copy link

Hello,

I want to run the code. So, at first I built the MultiScaleDeformableAttention Module and it is installed successfully.

(virenv) mohammadh@ut-cavlab:/hdd/nasseri/TransTrack-main/models/ops$ python3 setup.py build install --install-lib='/hdd/nasseri/virenv/bin'
running build
running build_py
running build_ext
running install
running bdist_egg
running egg_info
writing MultiScaleDeformableAttention.egg-info/PKG-INFO
writing dependency_links to MultiScaleDeformableAttention.egg-info/dependency_links.txt
writing top-level names to MultiScaleDeformableAttention.egg-info/top_level.txt
reading manifest file 'MultiScaleDeformableAttention.egg-info/SOURCES.txt'
writing manifest file 'MultiScaleDeformableAttention.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/functions
copying build/lib.linux-x86_64-3.6/functions/ms_deform_attn_func.py -> build/bdist.linux-x86_64/egg/functions
copying build/lib.linux-x86_64-3.6/functions/__init__.py -> build/bdist.linux-x86_64/egg/functions
creating build/bdist.linux-x86_64/egg/modules
copying build/lib.linux-x86_64-3.6/modules/ms_deform_attn.py -> build/bdist.linux-x86_64/egg/modules
copying build/lib.linux-x86_64-3.6/modules/__init__.py -> build/bdist.linux-x86_64/egg/modules
copying build/lib.linux-x86_64-3.6/MultiScaleDeformableAttention.cpython-36m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/functions/ms_deform_attn_func.py to ms_deform_attn_func.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/functions/__init__.py to __init__.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/modules/ms_deform_attn.py to ms_deform_attn.cpython-36.pyc
byte-compiling build/bdist.linux-x86_64/egg/modules/__init__.py to __init__.cpython-36.pyc
creating stub loader for MultiScaleDeformableAttention.cpython-36m-x86_64-linux-gnu.so
byte-compiling build/bdist.linux-x86_64/egg/MultiScaleDeformableAttention.py to MultiScaleDeformableAttention.cpython-36.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying MultiScaleDeformableAttention.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying MultiScaleDeformableAttention.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying MultiScaleDeformableAttention.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying MultiScaleDeformableAttention.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
__pycache__.MultiScaleDeformableAttention.cpython-36: module references __file__
creating 'dist/MultiScaleDeformableAttention-1.0-py3.6-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing MultiScaleDeformableAttention-1.0-py3.6-linux-x86_64.egg
removing '/hdd/nasseri/virenv/bin/MultiScaleDeformableAttention-1.0-py3.6-linux-x86_64.egg' (and everything under it)
creating /hdd/nasseri/virenv/bin/MultiScaleDeformableAttention-1.0-py3.6-linux-x86_64.egg
Extracting MultiScaleDeformableAttention-1.0-py3.6-linux-x86_64.egg to /hdd/nasseri/virenv/bin
MultiScaleDeformableAttention 1.0 is already the active version in easy-install.pth

Installed /hdd/nasseri/virenv/bin/MultiScaleDeformableAttention-1.0-py3.6-linux-x86_64.egg
Processing dependencies for MultiScaleDeformableAttention==1.0
Finished processing dependencies for MultiScaleDeformableAttention==1.0

and after that the pip can find the MultiScaleDeformableAttention Module:

pip show MultiScaleDeformableAttention
Name: MultiScaleDeformableAttention
Version: 1.0
Summary: Multi-Scale Deformable Attention Module in Deformable DETR
Home-page: xxx
Author: Weijie Su
Author-email: UNKNOWN
License: UNKNOWN
Location: /hdd/nasseri/virenv/bin
Requires:
Required-by:

But when I run the main_track.py, I get the following error:

(virenv) mohammadh@ut-cavlab:/hdd/nasseri/TransTrack-main$ python3 main_track.py
Traceback (most recent call last):
  File "main_track.py", line 25, in <module>
    from models import build_tracktrain_model, build_tracktest_model, build_model
  File "/hdd/nasseri/TransTrack-main/models/__init__.py", line 10, in <module>
    from .deformable_detr import build
  File "/hdd/nasseri/TransTrack-main/models/deformable_detr.py", line 25, in <module>
    from .deformable_transformer import build_deforamble_transformer
  File "/hdd/nasseri/TransTrack-main/models/deformable_transformer.py", line 18, in <module>
    from models.ops.modules import MSDeformAttn
  File "/hdd/nasseri/TransTrack-main/models/ops/modules/__init__.py", line 1, in <module>
    from .ms_deform_attn import MSDeformAttn
  File "/hdd/nasseri/TransTrack-main/models/ops/modules/ms_deform_attn.py", line 11, in <module>
    from ..functions import MSDeformAttnFunction, ms_deform_attn_core_pytorch
  File "/hdd/nasseri/TransTrack-main/models/ops/functions/__init__.py", line 1, in <module>
    from .ms_deform_attn_func import MSDeformAttnFunction, ms_deform_attn_core_pytorch, ms_deform_attn_core_pytorch_mot
  File "/hdd/nasseri/TransTrack-main/models/ops/functions/ms_deform_attn_func.py", line 11, in <module>
    import MultiScaleDeformableAttention as MSDA
ImportError: /hdd/nasseri/virenv/bin/MultiScaleDeformableAttention-1.0-py3.6-linux-x86_64.egg/MultiScaleDeformableAttention.cpython-36m-x86_64-linux-gnu.so: undefined symbol: THPVariableClass

How can I solve the problem?

@PeizeSun PeizeSun added help wanted Extra attention is needed question Further information is requested and removed help wanted Extra attention is needed labels Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants