Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When launching gnuradio companion it gives this error message:

Cannot import gnuradio.

Is the python path environment variable set correctly?
    All OS: PYTHONPATH

Is the library path environment variable set correctly?
    Linux: LD_LIBRARY_PATH
    Windows: PATH
    MacOSX: DYLD_LIBRARY_PATH

I do have python 2.7.3 installed. I installed gnuradio using binaries .deb file from the website below:::: http://ettus-apps.sourcerepo.com/redmine/ettus/projects/uhd/wiki/GNURadio_Linux I do not think the problem from GNURadio something it should be done with those libraries...

share|improve this question
    
How did you install gnuradio-companion? –  Takkat Oct 13 '13 at 8:06
    
I used a binary package taken from website below:::: ettus-apps.sourcerepo.com/redmine/ettus/projects/uhd/wiki/… –  kohahoha Oct 13 '13 at 11:30

1 Answer 1

I also have been plagued by this problem. I have a solution that works for me, but I am at a loss to explain why it works. I stumbled upon it entirely by accident.

At a shell prompt type:

CODE export PYTHONPATH=/usr/local/lib64/python2.5/site-packages CODE

Yes, even though I have Python 2.7 installed, and the diectory is, in fact, named "python2.7". Set the environment to look for "python2.5"

Giving the "env" command at the terminal shows that the "PYTHONPATH" is now set to look for "python2.5"

Now, gnuradio-companion starts up without the error dialog.

share|improve this answer
1  
Bad idea, won't this break other apps that need 2.7? –  Tim Dec 14 at 20:32
    
@Tim: You are correct, it might break other things that depend on Python2.7. I have not tested if this is so.The larger question to be asked is this: what if anything is broken in gnuradio-companion that something like my proposed solution should work? It should NOT work, but it does. I wish I had the time to look into this more. Meanwhile, making the change at the shell prompt ensures that you can test this, look at gnuradio-companion, reboot, and be back to normal. –  M. G. Christensen 2 days ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.