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

ImportError: No module named dvbt_swig #18

Open
VigibotDev opened this issue Jul 11, 2015 · 3 comments
Open

ImportError: No module named dvbt_swig #18

VigibotDev opened this issue Jul 11, 2015 · 3 comments

Comments

@VigibotDev
Copy link

Hello,
I can't deal with this issue:( don't understand python "swig", I tested swig and swig3.0 from debian repo with same issue.

linux; GNU C++ version 4.9.1; Boost_105500; UHD_003.007.003-0-unknown

Traceback (most recent call last):
  File "/root/gr-dvbt/apps/top_block.py", line 23, in <module>
    import dvbt
  File "/usr/lib/python2.7/dist-packages/dvbt/__init__.py", line 45, in <module>
    from dvbt_swig import *
ImportError: No module named dvbt_swig

>>> Done
# Temporary workaround for ticket:181 (swig+python problem)
import sys
_RTLD_GLOBAL = 0
try:
    from dl import RTLD_GLOBAL as _RTLD_GLOBAL
except ImportError:
    try:
        from DLFCN import RTLD_GLOBAL as _RTLD_GLOBAL
    except ImportError:
        pass

if _RTLD_GLOBAL != 0:
    _dlopenflags = sys.getdlopenflags()
    sys.setdlopenflags(_dlopenflags|_RTLD_GLOBAL)
# ----------------------------------------------------------------


# import swig generated symbols into the dvbt namespace
from dvbt_swig import *
@jontutcher
Copy link

Yo @serveurperso. This happened to me too - if you've installed swig you just need to re-compile the whole application and it should work. It's probably an issue that compilation succeeds without errors if you don't have swig installed, when in fact it makes the python libs unusable... :)

@stackprogramer
Copy link

stackprogramer commented Mar 30, 2017

i had same problem,i installed swig,apt-get install swig.and i again maked gr-dvbt gain,and my problem is solved.

@ducnguyenAstro
Copy link

Thank @stackprogramer 👍
It works like a charm:
First, IF you run cmake without SWIG installed, there are warnings:
-- Checking for module SWIG
-- Disabling SWIG because version check failed.
after installing SWIG as @stackprogramer mentioned, it should be showing as:
-- Checking for module SWIG
-- Found SWIG version 3.0.12.
-- Found SWIG: /usr/bin/swig3.0

And my codes working just fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants