[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: |
Sat, 06 Jan 2018 20:13:26 -0500 |
Hi Sakthivel - Glad you found a way to get your GR OOT working. The need for
adding to PYTHONPATH depends on how the OOT was installed. Usually GR OOTs are
installed such that you can just "import <module_name>" without having to tweak
the PYTHONPATH since the "gr" Python stuff is already installed in a place
where Python can get to it -- the same as where OOTs are installed by default.
Unless you changes something in the CMakeLists.txt files for how the Python &
SWIG are installed, then they should go into (by default)
"/usr/local/lib/python2.7/dist-packages/<module_name>/", which will contain a
file "__init__.py", which in turn loads all of the actual Python & SWIG stuff.
You might want to verify the actual OOT Python install for this file. Cheers! -
MLD
On Sat, Jan 6, 2018, at 6:51 AM, Sakthivel Velumani wrote:
> 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?