Cannot import gnuradio. Is python set correctly?











up vote
1
down vote

favorite
1












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
















bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • 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

















up vote
1
down vote

favorite
1












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
















bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • 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















up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





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















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...







python






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 13 '13 at 17:31

























asked Oct 12 '13 at 23:02









kohahoha

614




614





bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 2 days ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.














  • 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




















  • 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


















How did you install gnuradio-companion?
– Takkat
Oct 13 '13 at 8:06




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






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












3 Answers
3






active

oldest

votes

















up vote
0
down vote













In what must be my 6th distinct attempt in as many months to setup and run GNU Radio on Windows, I have finally succeeded! I admit I'm a little delirious with joy and disbelief. I'm answering here because I was getting the exact same error you are, and I suspect you're having the same problem despite the different platform.



What worked for me (after installing GNU Radio binaries from Ettus, including adding it to the path, and installing Python 2.7):




  1. Set PYTHONPATH=[your Python install]Libsite-packages;[GNU Radio install]libsite-packages

  2. pip install pygtk

  3. pip install numpy

  4. pip install lxml

  5. pip install Cheetah


(Note: on Windows, pip installs must be run from elevated command prompt "Run as administrator")



I figured out the problem by launching Python interactively and trying the failing statement from gnuradio-companion.py manually, from gnuradio import gr which gave me ImportError: No module named numpy. That's when it clicked that the module loading was failing while loading its dependent modules, and pip to the rescue to solve that!






share|improve this answer






























    up vote
    0
    down vote













    Try this after setting the PATH variables



    ln -sf /usr/lib/x86_64-linux-gnu/libvolk.so.1.3.1 /usr/lib/x86_64-linux-gnu/libvolk.so.1.3






    share|improve this answer




























      up vote
      -1
      down vote













      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 '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
        Dec 18 '14 at 15:49











      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














       

      draft saved


      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f357346%2fcannot-import-gnuradio-is-python-set-correctly%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      0
      down vote













      In what must be my 6th distinct attempt in as many months to setup and run GNU Radio on Windows, I have finally succeeded! I admit I'm a little delirious with joy and disbelief. I'm answering here because I was getting the exact same error you are, and I suspect you're having the same problem despite the different platform.



      What worked for me (after installing GNU Radio binaries from Ettus, including adding it to the path, and installing Python 2.7):




      1. Set PYTHONPATH=[your Python install]Libsite-packages;[GNU Radio install]libsite-packages

      2. pip install pygtk

      3. pip install numpy

      4. pip install lxml

      5. pip install Cheetah


      (Note: on Windows, pip installs must be run from elevated command prompt "Run as administrator")



      I figured out the problem by launching Python interactively and trying the failing statement from gnuradio-companion.py manually, from gnuradio import gr which gave me ImportError: No module named numpy. That's when it clicked that the module loading was failing while loading its dependent modules, and pip to the rescue to solve that!






      share|improve this answer



























        up vote
        0
        down vote













        In what must be my 6th distinct attempt in as many months to setup and run GNU Radio on Windows, I have finally succeeded! I admit I'm a little delirious with joy and disbelief. I'm answering here because I was getting the exact same error you are, and I suspect you're having the same problem despite the different platform.



        What worked for me (after installing GNU Radio binaries from Ettus, including adding it to the path, and installing Python 2.7):




        1. Set PYTHONPATH=[your Python install]Libsite-packages;[GNU Radio install]libsite-packages

        2. pip install pygtk

        3. pip install numpy

        4. pip install lxml

        5. pip install Cheetah


        (Note: on Windows, pip installs must be run from elevated command prompt "Run as administrator")



        I figured out the problem by launching Python interactively and trying the failing statement from gnuradio-companion.py manually, from gnuradio import gr which gave me ImportError: No module named numpy. That's when it clicked that the module loading was failing while loading its dependent modules, and pip to the rescue to solve that!






        share|improve this answer

























          up vote
          0
          down vote










          up vote
          0
          down vote









          In what must be my 6th distinct attempt in as many months to setup and run GNU Radio on Windows, I have finally succeeded! I admit I'm a little delirious with joy and disbelief. I'm answering here because I was getting the exact same error you are, and I suspect you're having the same problem despite the different platform.



          What worked for me (after installing GNU Radio binaries from Ettus, including adding it to the path, and installing Python 2.7):




          1. Set PYTHONPATH=[your Python install]Libsite-packages;[GNU Radio install]libsite-packages

          2. pip install pygtk

          3. pip install numpy

          4. pip install lxml

          5. pip install Cheetah


          (Note: on Windows, pip installs must be run from elevated command prompt "Run as administrator")



          I figured out the problem by launching Python interactively and trying the failing statement from gnuradio-companion.py manually, from gnuradio import gr which gave me ImportError: No module named numpy. That's when it clicked that the module loading was failing while loading its dependent modules, and pip to the rescue to solve that!






          share|improve this answer














          In what must be my 6th distinct attempt in as many months to setup and run GNU Radio on Windows, I have finally succeeded! I admit I'm a little delirious with joy and disbelief. I'm answering here because I was getting the exact same error you are, and I suspect you're having the same problem despite the different platform.



          What worked for me (after installing GNU Radio binaries from Ettus, including adding it to the path, and installing Python 2.7):




          1. Set PYTHONPATH=[your Python install]Libsite-packages;[GNU Radio install]libsite-packages

          2. pip install pygtk

          3. pip install numpy

          4. pip install lxml

          5. pip install Cheetah


          (Note: on Windows, pip installs must be run from elevated command prompt "Run as administrator")



          I figured out the problem by launching Python interactively and trying the failing statement from gnuradio-companion.py manually, from gnuradio import gr which gave me ImportError: No module named numpy. That's when it clicked that the module loading was failing while loading its dependent modules, and pip to the rescue to solve that!







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 14 '16 at 9:02

























          answered May 14 '16 at 8:47









          Eliot Gillum

          1011




          1011
























              up vote
              0
              down vote













              Try this after setting the PATH variables



              ln -sf /usr/lib/x86_64-linux-gnu/libvolk.so.1.3.1 /usr/lib/x86_64-linux-gnu/libvolk.so.1.3






              share|improve this answer

























                up vote
                0
                down vote













                Try this after setting the PATH variables



                ln -sf /usr/lib/x86_64-linux-gnu/libvolk.so.1.3.1 /usr/lib/x86_64-linux-gnu/libvolk.so.1.3






                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  Try this after setting the PATH variables



                  ln -sf /usr/lib/x86_64-linux-gnu/libvolk.so.1.3.1 /usr/lib/x86_64-linux-gnu/libvolk.so.1.3






                  share|improve this answer












                  Try this after setting the PATH variables



                  ln -sf /usr/lib/x86_64-linux-gnu/libvolk.so.1.3.1 /usr/lib/x86_64-linux-gnu/libvolk.so.1.3







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered May 27 at 21:49









                  dark night

                  1




                  1






















                      up vote
                      -1
                      down vote













                      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 '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
                        Dec 18 '14 at 15:49















                      up vote
                      -1
                      down vote













                      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 '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
                        Dec 18 '14 at 15:49













                      up vote
                      -1
                      down vote










                      up vote
                      -1
                      down vote









                      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












                      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












                      share|improve this answer



                      share|improve this answer










                      answered Dec 14 '14 at 18:14









                      M. G. Christensen

                      11




                      11








                      • 1




                        Bad idea, won't this break other apps that need 2.7?
                        – Tim
                        Dec 14 '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
                        Dec 18 '14 at 15:49














                      • 1




                        Bad idea, won't this break other apps that need 2.7?
                        – Tim
                        Dec 14 '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
                        Dec 18 '14 at 15:49








                      1




                      1




                      Bad idea, won't this break other apps that need 2.7?
                      – Tim
                      Dec 14 '14 at 20:32




                      Bad idea, won't this break other apps that need 2.7?
                      – Tim
                      Dec 14 '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
                      Dec 18 '14 at 15:49




                      @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
                      Dec 18 '14 at 15:49


















                       

                      draft saved


                      draft discarded



















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f357346%2fcannot-import-gnuradio-is-python-set-correctly%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      數位音樂下載

                      格利澤436b

                      When can things happen in Etherscan, such as the picture below?