I am trying to make my own module. I used gr-how-to-write-a-block as a
skeleton for my module. The module compiles and passes a simple test in
the python test directory. I then do “make install” and it installs the
module. When I try to run a python script with that module I get an
error that says “ImportError: No module named xxxxxxx”. This happens for
the gr-how-to-write-a-block as well as my own module.
Does anyone have a clue as to why my module does not load outside of the
“test” environment?
the python test directory. I then do “make install” and it installs the
module. When I try to run a python script with that module I get an error
that says “ImportError: No module named xxxxxxx”. This happens for the gr-
how-to-write-a-block as well as my own module.
Does anyone have a clue as to why my module does not load outside of the
“test” environment?
Regards,
Daniel G.
Make sure all references are properly listed in Makefile.am, general.i
(this
is in the gnuradio-core/src; not sure if you have one from the
how-to…,
haven’t looked at that in quite some time), and your *.i file is written
correctly.
I’d also do a “make clean && make && make install” in case SWIG doesn’t
want
to look at the new block (basically, I think the problem is that SWIG
isn’t
compiling it into the Python module properly).
On Mon, Dec 04, 2006 at 09:06:14PM -0800, Daniel G. wrote:
I am trying to make my own module. I used gr-how-to-write-a-block as a skeleton for my module. The module compiles and passes a simple test in the python test directory. I then do “make install” and it installs the module. When I try to run a python script with that module I get an error that says “ImportError: No module named xxxxxxx”. This happens for the gr-how-to-write-a-block as well as my own module.
Does anyone have a clue as to why my module does not load outside of the “test” environment?
Does your PYTHONPATH include the path to where ever you installed the
module?
On Tue, Dec 05, 2006 at 12:13:40AM -0500, Tom R. wrote:
skeleton for my module. The module compiles and passes a simple test in
Tom
Tom, I think it’s a PYTHONPATH problem.
It passes “make check”, thus I think it’s built OK. The difference
between the make check environment and the normal environment is the
path where the new module is searched.
From: discuss-gnuradio-bounces+trondeau=removed_email_address@domain.invalid
the python test directory. I then do “make install” and it installs
I’d also do a “make clean && make && make install” in case SWIG doesn’t
want
to look at the new block (basically, I think the problem is that SWIG
isn’t
compiling it into the Python module properly).
Tom
Tom, I think it’s a PYTHONPATH problem.
I see; makes sense. I had just screwed myself up last night working on
the
GNU Radio module itself because of a typo in general.i. It produces a
similar problem, so I shot that post out. I’m so used to working in that
context that I never consider PYTHONPATH.
It passes “make check”, thus I think it’s built OK. The difference
between the make check environment and the normal environment is the
path where the new module is searched.
Ok, thanks.
Tom
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.