I've gone through the How to Write a Signal Processing Block article. Everything worked - better than it was supposed to. When I got to the first time I was supposed to run "make check" and it was supposed to fail, it passed. I'm assuming that this is because the tarball included the howto module which the article assumes hasn't been written yet. Fine. So, per the article, "Victory! Our new block works!" Or does it? If I try to run the top level Python program, qa_howto.py, I get the following error message: ImportError: No module named howto I tracked down the howto.py file (located in the lib directory) and copied it to the python site-packages directory. Now I get the error message: ImportError: No module named _howto The only file I can find by that name is _howto.la (again, in the lib directory). I copied it over to the site-packages directory, but got the same result. What do I need to do (and, more importantly, how am I supposed to know that I need to do it) in order to actually run the python program (qa_howto.py) that supposedly passed all of the make checks?
on 2007-01-31 00:20
on 2007-01-31 01:39
Bahn William L Civ USAFA/DFCS wrote: > Fine. So, per the article, "Victory! Our new block works!" > > Or does it? > > If I try to run the top level Python program, qa_howto.py, I get the > following error message: > > ImportError: No module named howto The operation 'make check' ultimately results in running the program 'run_tests' that lives in the src/python directory. This is a shell script that sets several important variables that allow the Python interpreter to find everything in the build tree at runtime. It then runs qa_howto.py with this modified environment. By running qa_howto.py from the command line, you are bypassing this, and the Python interpreter is looking for everything in the system directory. Since you haven't installed the newly compiled code into the system yet, it doesn't find anything. (Even if you did, the qa_howto.py isn't written to properly import things from there.) So the code really is working, as evidenced by 'make check' passing. > What do I need to do (and, more importantly, how am I supposed to know > that I need to do it) in order to actually run the python program > (qa_howto.py) that supposedly passed all of the make checks? As I mentioned, 'make check' eventually *does* run qa_howto.py, in a modified runtime environment to find things in the build tree. Incidentally, there is a significant portion of the 2-day training agenda/lab session that goes through all this a minute detail. -Johnathan