discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Running flowgraphs from command line


From: Kevin Hofschröer
Subject: Re: [Discuss-gnuradio] Running flowgraphs from command line
Date: Mon, 7 Sep 2015 19:13:12 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

Hi Patrick,

I think I might have the answer, although Michael Dickens could
certainly provide better explanations and all that.

You need to check your environment variables. You can do that in the
command line by typing "env".
Normally you should see something like
"
PYTHONPATH=/opt/local/Library/Frameworks/Python.framework/Version/2.7/lib/python2.7/site-packages/:/opt/local/lib/:/usr/local/lib/
"
in the output.
Normally Macports should adapt your ~/.profile file in order to tell
your system where Macports put the stuff you installed.

If for some reasons that fails, your PYTHONPATH (in this case) will not
point to the correct directories.

If that indeed is the case, then you might insert some lines to your
~/.profile file, i.e.

"export
PYTHONPATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/:/opt/local/lib/:/usr/local/lib/:$PYTHONPATH"

and

"export PATH="/opt/local/bin:/opt/local/sbin:$PATH""

at the end of that file.

You might want to make sure that you can find PyQT4 yourself in those
given directories. For example my PyQT4 folder is under

"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages"

After you inserted those lines to your .profile, you just need to open a
new terminal, and you can again check via "env" if that worked out.

Regards,
Kevin


Am 07.09.15 um 18:29 schrieb Patrick Krämer:
> Hi everybody,
> 
> I installed GNURadio on a fresh machine with Mac OS X 10.10.5 via MacPorts. I 
> now have 2 Python installs in /usr/bin, python2.6 and python2.7. Running 
> flowgraphs with GRC is no problem. However, when trying to run a .py-file 
> from the terminal, as suggested in the guided tutorial 3.1 („if else“) some 
> modules are not found: 
> 
> Patricks-iMac:work patrick$ python if_else_mod.py
> Traceback (most recent call last):
>   File "if_else_mod.py", line 18, in <module>
>     from PyQt4 import Qt
> ImportError: No module named PyQt4
> 
> 
> Why does it work, when running the file from GRC? Is my terminal using the 
> wrong python install? How could I change that? I also tried changing the path 
> variable on my notebook a few days ago, when I ran into the same problem. But 
> since I am new to python and the command line I obviously made a mistake so 
> that at some point I could not start the GRC anymore. So your help is 
> appreciated and needed. Couldn’t find a similar question in the archives.
> 
> Thank you.
> Patrick
> 
> 
> 
> 
> 
> _______________________________________________
> 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]