Hi Michael, I ran the qa file after "make install". " clearly you've tried installing, but that doesn't mean that's the way you're testing" I don't understand what this means. I do "sudo make install, sudo ldconfig" and run the python file. I tried commenting the lines you said but still gave the same import error. Then I manually added the directory /usr/local/lib/python2.7/ dist-packages/<module_name> to PYTHONPATH and it worked - the test ran successfully. However /usr/local/lib/python2.7/dist-packages was already included in PYTHONPATH. Will not python look for files in subdirectory also? If not how to make it to do that?
Best regards, Sakthivel On Sat, Jan 6, 2018 at 1:30 AM, Michael Dickens <[email protected]> wrote: > 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. > > >
_______________________________________________ Discuss-gnuradio mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
