I followed the instructions on http://gnuradio.org/redmine/wiki/gnuradio/UbuntuInstall to install
gnuradio-3.3.0 onto Ubuntu-10.04 LTS. I used qwt-5.2.1, boost_1_37_0,
and
all other packages from synaptic package manager. After ./configure
–with-boost=$BOOST_PREFIX, I got:
The following GNU Radio components have been successfully configured:
These components will not be built.
Configured GNU Radio release 3.3.0 for build.
Meanwhile, there is no error during the installation. And the USRP is
recognized by “ls -lR /dev/bus/usb | grep usrp”, I got “crw-rw---- 1
root
usrp 189, 129 2010-08-25 13:12 002”.
However, when I tried to run “./usrp_benchmark_usb.py”, I got the error
that
“ImportError: cannot import name usrp”. I also found that there is
nothing
under directory /usr/local/lib/python2.6/site-packages. How should I fix
this problem? Can anyone give me some advice?
I also found that there is nothing
under directory /usr/local/lib/python2.6/site-packages. How should I fix
this problem? Can anyone give me some advice?
Perhaps this is because you might not have run a
sudo make install
after building gnuradio, which will install the required python packages
into /usr/local/lib
Nothing helps. BTW, I used libboost-all-dev from synaptic package
manager
rather than boost_1_37_0.
Doug, you are right. I find gnuradio under
/usr/local/lib/python/dist-packages/. My old Ubuntu version has the path
/usr/local/lib/python/site-packages/gnuradio.
Other solutions?
Thanks,
Brook
Jeffrey L. wrote:
gnuradio-core
gr-gsm-fr-vocoder
gnuradio-examples
gr-gcell
recognized by “ls -lR /dev/bus/usb | grep usrp”, I got "crw-rw---- 1 root
Brook
On Wed, Aug 25, 2010 at 02:21:27PM -0700, Brook L. wrote:
Doug, you are right. I find gnuradio under
/usr/local/lib/python/dist-packages/. My old Ubuntu version has the path
/usr/local/lib/python/site-packages/gnuradio.
Other solutions?
Is your PYTHONPATH set to /usr/local/lib/python2.6/dist-packages?
Is your PYTHONPATH exported?
Does this work:
$ python
Python 2.6.4 (r264:75706, Jun 4 2010, 18:20:31)
[GCC 4.4.4 20100503 (Red Hat 4.4.4-2)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
from gnuradio import gr
from gnuradio import usrp
exit()
You can put these in the “.bashrc” file in your home directory if it
becomes a pain to type manually.
You might want to get a book on “Linux for beginners” or something like
that, which will help
you with quite simple things like “how to set an environment
variable”.
–
Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
Is your PYTHONPATH set to /usr/local/lib/python2.6/dist-packages?
Is your PYTHONPATH exported?
I’m not sure on these two questions. I installed python2.6 from synaptic
package manager, I thought it should set the path right. If not, could
you
please tell me how to set PYTHONPATH and how to export PYTHONPATH?
Here is the result when I test $ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
from gnuradio import gr
from gnuradio import usrp
Traceback (most recent call last):
File “”, line 1, in
ImportError: cannot import name usrp
I tried usrp_fft.py and got the same error. I also tried dial_tone.py
under
/gnuradio-example/python/audio, but I got the similar error:
Traceback (most recent call last):
File “./dial_tone.py”, line 24, in
from gnuradio import audio
File “/usr/lib/python2.6/dist-packages/gnuradio/audio.py”, line 88, in
init()
File “/usr/lib/python2.6/dist-packages/gnuradio/audio.py”, line 78, in init
raise ImportError, ‘Unable to locate an audio module.’
ImportError: Unable to locate an audio module.
However, if I import audio from gnuradio using $ python, there is no
error.
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
from gnuradio import gr
from gnuradio import audio
On Wed, Aug 25, 2010 at 04:03:59PM -0700, Brook L. wrote:
Thanks, Marcus.
I tried usrp_fft.py and got the same error. I also tried dial_tone.py under
/gnuradio-example/python/audio, but I got the similar error:
I’m guessing that you have more than one installation on your system.
Perhaps one installed a while back using a .deb, and the one that
you’re trying to build now.
(grc:2743): Gtk-WARNING **: Unable to locate theme engine in
module_path: “pixmap”,
(grc:2743): Gtk-WARNING **: Unable to locate theme engine in
module_path: “pixmap”,
(grc:2743): Gtk-WARNING **: Unable to locate theme engine in
module_path: “pixmap”,
(grc:2743): Gtk-WARNING **: Unable to locate theme engine in
module_path: “pixmap”,
<<< Welcome to GNU Radio Companion 3.2.2 >>>
Error: ‘options’
Failue
Traceback (most recent call last):
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/MainWindow.py”, line
174, in new_page
flow_graph = self._platform.get_new_flow_graph()
File “/usr/lib/python2.7/dist-packages/gnuradio/grc/base/Platform.py”,
line 149, in get_new_flow_graph
def get_new_flow_graph(self): return self.FlowGraph(self)
File “”, line 4, in init
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/base/FlowGraph.py”, line
37, in init
self.import_data()
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/base/FlowGraph.py”, line
192, in import_data
self._options_block = self.get_parent().get_new_block(self,
‘options’)
File “/usr/lib/python2.7/dist-packages/gnuradio/grc/base/Platform.py”,
line 159, in get_new_block
def get_new_block(self, flow_graph, key): return
self.Block(flow_graph, n=self._blocks_n[key])
File “/usr/lib/python2.7/dist-packages/gnuradio/grc/base/odict.py”,
line 34, in getitem
return self._data[key]
KeyError: ‘options’
Error: ‘options’
Failue
Traceback (most recent call last):
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/MainWindow.py”, line
174, in new_page
flow_graph = self._platform.get_new_flow_graph()
File “/usr/lib/python2.7/dist-packages/gnuradio/grc/base/Platform.py”,
line 149, in get_new_flow_graph
def get_new_flow_graph(self): return self.FlowGraph(self)
File “”, line 4, in init
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/base/FlowGraph.py”, line
37, in init
self.import_data()
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/base/FlowGraph.py”, line
192, in import_data
self._options_block = self.get_parent().get_new_block(self,
‘options’)
File “/usr/lib/python2.7/dist-packages/gnuradio/grc/base/Platform.py”,
line 159, in get_new_block
def get_new_block(self, flow_graph, key): return
self.Block(flow_graph, n=self._blocks_n[key])
File “/usr/lib/python2.7/dist-packages/gnuradio/grc/base/odict.py”,
line 34, in getitem
return self._data[key]
KeyError: ‘options’
Traceback (most recent call last):
File “/usr/bin/grc”, line 53, in
ActionHandler(args, Platform())
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/ActionHandler.py”,
line 70, in init
self.handle_states(Actions.APPLICATION_INITIALIZE)
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/ActionHandler.py”,
line 332, in handle_states
Actions.get_action_from_name(Actions.ELEMENT_DELETE).set_sensitive(bool(self.get_flow_graph().get_selected_elements()))
File
“/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/MainWindow.py”, line
281, in get_flow_graph
return self.get_page().get_flow_graph()
AttributeError: ‘NoneType’ object has no attribute ‘get_flow_graph’
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.