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: Michael Dickens
Subject: Re: [Discuss-gnuradio] Running flowgraphs from command line
Date: Mon, 07 Sep 2015 21:04:44 -0400

Hi Patrick - So what's happening is that with GRC, because it was
installed via MacPorts the MP version of Python is used. The terminal
only knows what you tell it via environment variables such as PYTHONPATH
(already suggested by Kevin Hofschröer) and PATH. In your case right
now, I'll bet that the PATH contains /usr/bin before /opt/local/bin (if
the latter is listed at all). If you do "which python", you'll see what
your shell is executing when you type "python" (again, better
/usr/bin/python [2.7 something]). Even if you add /opt/local/bin at the
start of PATH, you might still need to tell MP to select the version of
Python you want to use when you type "python" in the shell. You can list
the options port has via "port select --list python", and then select
Python 2.7 via "sudo port select python python27" if it not already
active. Combining this with making sure /opt/local/bin comes first in
PATH should solve your issue. Hope this helps! - MLD

On Mon, Sep 7, 2015, at 12:29 PM, Patrick Krämer wrote:
> 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.



reply via email to

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