Hi, Seems like you got it. I'm writing here analysis and fixing steps for future generations.
1. Reproduce the problem by running 'python -c "from gnuradio import gr' - that should crash and print the error 2. Running "which python" should show the python binary used, most probably /usr/bin/python 3. 'port list | grep "lang/python"' will show the installed MacPort Python versions. 4. Assuming your default Python is 2.7 ("python -V" to verify), "port contents python27 | grep bin/python" will show the binaries installed by that Python 2.7 port, which will probably be /opt/local/bin/python2.7 (which symlinks to /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7). 5. *Running '/opt/local/bin/python2.7 -c "from gnuradio import gr"' works as expected* 6. So it's possible to work with GNU Radio as long as you use the correct Python binary. In my case, the PATH environment variable did have /opt/local/bin before /usr/local/bin, but MacPorts doesn't create a "python" symlink, so it can be fixed by either using "python2.7" (which exists in /opt/local/bin and will be used before the system's binary) or by creating a symlink with "ln -s /usr/local/bin/python2.7 /usr/local/bin/python". After symlinking, 'python -c "from gnuradio import gr' works as expected. On Mon, Nov 21, 2016 at 6:44 PM Michael Dickens <michael.dick...@ettus.com> wrote: > Hi Gilad - IIRC this error means that Python installs are being mixed > between linking and runtime. For example, linking against the macOS > provided Python and then trying to use MacPorts' Python for runtime > execution. If this statement doesn't help, email me off-list & we'll work > through your issue. - MLD > > On Mon, Nov 21, 2016, at 11:10 AM, Gilad Beeri (ApolloShield) wrote: > > The Python statement "from gnuradio import gr" crashes the Python process > with "Fatal Python error: PyThreadState_Get: no current thread" (mac OS > 10.12.1, GNU Radio 3.7.10.1 using Mac Ports, full log is attached). > > I tried following the cleanup process detailed in > https://github.com/metacollin/homebrew-gnuradio/issues/47, > which caused me to remove the GR modules foo, baz and ieee802_11, such > that in a 2nd execution of that script it doesn't find anything. > Tried reinstalling GNU Radio with "sudo port -f uninstall gnuradio; sudo > port -t install gnuradio" but still no luck. > > Email had 1 attachment: > > - gnuradio_python_exception.txt > 24k (text/plain) > > >
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio