discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Python import error on swig modules


From: Michael Dickens
Subject: Re: [Discuss-gnuradio] Python import error on swig modules
Date: Fri, 05 Jan 2018 19:30:21 -0500

Hi Sakthivel - It's not clear whether you are trying to test in place or after "make install" ... clearly you've tried installing, but that doesn't mean that's the way you're testing. Your info on the install location & path seems correct; maybe there's an import error in the compiled SWIG module? You can try manually by doing "import <module_name>" directly in Python. This may or not fail. If it does, one option is to edit the file "/usr/local/lib/python2.7/dist-packages/<module_name>/<module_name>_swig.py" and look for the function "swig_import_helper" for Python >= 2.7.0 (near the top of the file), and comment out the "try:", "except:", and final function line ("return importlib.import_module('_<module_name>_swig')"). With those lines commented out, you should see the actual import error. Hope this helps! - MLD

On Fri, Jan 5, 2018, at 1:13 PM, Sakthivel Velumani wrote:
I have been trying to do the simplest qa test for my qpsk demod C++ block from the tutorials. When I run the qa_<block_name>.py im getting an import error: No module named <module_name>_swig. This happens for every C++ blocks.

I can see that <module_name>_swig.py is being installed into 
/usr/local/lib/python2.7/dist-packages/<module_name>/<module_name>_swig.py, pyc and .pyo .
And when I checked sys.path in python, I can see the path /usr/local/lib/python2.7/dist-packages along with many other paths.

Any help would be appreciated.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]