discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] ImportError: No module named ...


From: Marcus Leech
Subject: Re: [Discuss-gnuradio] ImportError: No module named ...
Date: Wed, 23 Jul 2014 15:08:17 +0000 (UTC)

Indeed, the only reason to run things under "sudo" is when you're doing something that needs root privilege, like updating system files
  (such as when you do a sudo make install), or you're trying ot get access to some resource that an ordinary user doesn't have access to.
 
Ordinary applications (which is 99% of everything you'll ever use) just require your ordinary userid.  That was a time *very* long ago when a
  fully-installed Gnu Radio installation required apps that accessed USB devices (like USRP1) to run as root, just because there was no udev rules
  installed.  That was fixed years and years ago.
 
 
 
on Jul 23, 2014, Nguyễn Văn Lý <address@hidden> wrote:
Thanks Tom and Marcus,

So it's not necessary to run sudo gnuradio-companion at all :-)
Van-Ly
p/s: I am new to almost everything that I'm working with, from ubuntu to gnuradio :-) just glad to talk to you :-)

Nguyen Van-Ly,  
Vietnam National University, Hanoi - VNU  
University of Engineering and Technology - UET      
Faculty of Electronics and Telecommunications - FET         
 
Tel: +84 978 819 406
 


On Wed, Jul 23, 2014 at 9:43 PM, Marcus Müller <address@hidden> wrote:
Hi Van-Ly,

So, is there any difference between *sudo gnuradio-companion* and
*gnuradio-companion* ?

Yes, the "sudo" part ;)
sudo is used to make a program run under a different user, and in a
different environment. For example, sudo gnuradio-companion runs
gnuradio-companion as root. Why did you do that?

But that doesn't set the PYTHONPATH environment, so python can't find
the modules you installed to your local python package prefix.

Greetings,
Marcus

On 23.07.2014 16:32, Nguyễn Văn Lý wrote:
> Hi Marcus,
>
> I've gotten a surprising thing and I couldn't explain why.
> First, I type: sudo gnuradio-companion to open the GNUradio and test my own
> module. It turned out an error message as I described in the previous mail.
> (ImportError: No module named Tool_NetworkCoding)
> However, when I just type: gnuradio-companion and also run the same grc
> file, the error message disappeared, and everything then seems to go well.
>
> Thank you very much
> Van-Ly
>
>
>
> Nguyen Van-Ly,
> Vietnam National University, Hanoi - VNU
> University of Engineering and Technology - UET
> Faculty of Electronics and Telecommunications - FET
>
> Tel: +84 978 819 406
>
>
>
> On Wed, Jul 23, 2014 at 6:47 PM, Marcus Müller <address@hidden>
> wrote:
>
>>  Hi Van-Ly,
>>
>> if you installed everything correctly, Python should be able to find the
>> module.
>> You can verify this by looking at the install_manifest.txt in your OOT's
>> build/ directory, in which there should be an entry for every file it
>> copied.
>> Find your python files (there always should be an __init__.py) and check
>> if the target location is part of your $PYTHONPATH.
>>
>> Greetings,
>> Marcus
>>
>>
>> On 23.07.2014 13:35, Nguyễn Văn Lý wrote:
>>
>> Hi all,
>>
>> I have created a new module called Tool_NetworkCoding. During the
>> installation, I did not get any error message, everything went well. But
>> when I run a grc file to test some blocks inside this new module, it turned
>> out an error message:
>>
>>
>>
>> *Traceback (most recent call last):  File
>> "/home/van-ly/Downloads/top_block.py", line 16, in <module>    import
>> Tool_NetworkCodingImportError: No module named Tool_NetworkCoding*
>>
>> Please help me with this.
>> Thank you in advance
>> Van-Ly
>>
>> Nguyen Van-Ly,
>> Vietnam National University, Hanoi - VNU
>> University of Engineering and Technology - UET
>> Faculty of Electronics and Telecommunications - FET
>>
>> Tel: +84 978 819 406
>>
>> Standing on my own two feet !!!
>>
>>
>>
>>
>> _______________________________________________
>> Discuss-gnuradio mailing address@hidden://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>
>>
>>
>> _______________________________________________
>> Discuss-gnuradio mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>>
>>



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

reply via email to

[Prev in Thread] Current Thread [Next in Thread]