Opened 9 years ago

Closed 9 years ago

#45768 closed defect (invalid)

gnuradio @3.7.5.1_0+docs+grc+jack+orc+portaudio+python27+qtgui+sdl+swig+uhd+wavelet+wxgui ImportError at launch of Gnuradio-companion

Reported by: patrickmccanna@… Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.3.2
Keywords: Cc:
Port: gnuradio

Description (last modified by ryandesign (Ryan Carsten Schmidt))

I recently updated to 10.9.5 and tried to get gnuradio properly working for use with a HackRF.

Gnuradio-companion crashes out with the following error:

./gnuradio-companion

 
Traceback (most recent call last):
  File "/opt/local/bin/gnuradio-companion", line 24, in <module>
    import gtk
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 30, in <module>
    import gobject as _gobject
  File "/usr/local/lib/python2.7/site-packages/gobject/__init__.py", line 26, in <module>
    from glib import spawn_async, idle_add, timeout_add, timeout_add_seconds, \
  File "/usr/local/lib/python2.7/site-packages/glib/__init__.py", line 22, in <module>
    from glib._glib import *
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/glib/_glib.so, 2): Library not loaded: /usr/local/lib/libgobject-2.0.0.dylib
  Referenced from: /usr/local/lib/python2.7/site-packages/glib/_glib.so

Change History (6)

comment:1 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: gnuradio-companion removed
Milestone: MacPorts Future
Owner: changed from macports-tickets@… to michaelld@…

Please remove the software you have installed in /usr/local. Having software installed there can confuse MacPorts. After removing it, you may need to rebuild affected MacPorts ports.

comment:2 Changed 9 years ago by michaelld (Michael Dickens)

I'll second what Ryan wrote, and add: I'm not sure why Python is picking up /usr/local's install of Python, unless you have set the PYTHONPATH to include that before /opt/local, or maybe you're using Python from within /usr/local. It's generally not wise to have software installed in /usr/local that is duplicated in /opt/local ... so, removing the duplicated parts would be wise; or, just removing all of /usr/local if you can. That said, if you use MacPorts' Python (/opt/local/bin/python2.7) and make sure no /usr/local is in the PYTHONPATH, then you're probably OK ... worth a try before reinstalling everything. If it fails, then I think you're better off trying what Ryan wrote.

comment:3 in reply to:  2 ; Changed 9 years ago by patrickmccanna@…

Replying to michaelld@…:

My pythonpath is only "/usr/local/lib/python2.7/site-packages", so your comment seems right on. I'll update and report back.

I'll second what Ryan wrote, and add: I'm not sure why Python is picking up /usr/local's install of Python, unless you have set the PYTHONPATH to include that before /opt/local, or maybe you're using Python from within /usr/local. It's generally not wise to have software installed in /usr/local that is duplicated in /opt/local ... so, removing the duplicated parts would be wise; or, just removing all of /usr/local if you can. That said, if you use MacPorts' Python (/opt/local/bin/python2.7) and make sure no /usr/local is in the PYTHONPATH, then you're probably OK ... worth a try before reinstalling everything. If it fails, then I think you're better off trying what Ryan wrote.

comment:4 in reply to:  1 Changed 9 years ago by patrickmccanna@…

Replying to ryandesign@…:

/usr/local/bin is used by Docker. Is this likely to be a potential conflict for docker & gnuradio users in the future?

Please remove the software you have installed in /usr/local. Having software installed there can confuse MacPorts. After removing it, you may need to rebuild affected MacPorts ports.

comment:5 in reply to:  3 Changed 9 years ago by patrickmccanna@…

Updating the path worked. Thank you gents!

Replying to patrickmccanna@…:

Replying to michaelld@…:

My pythonpath is only "/usr/local/lib/python2.7/site-packages", so your comment seems right on. I'll update and report back.

I'll second what Ryan wrote, and add: I'm not sure why Python is picking up /usr/local's install of Python, unless you have set the PYTHONPATH to include that before /opt/local, or maybe you're using Python from within /usr/local. It's generally not wise to have software installed in /usr/local that is duplicated in /opt/local ... so, removing the duplicated parts would be wise; or, just removing all of /usr/local if you can. That said, if you use MacPorts' Python (/opt/local/bin/python2.7) and make sure no /usr/local is in the PYTHONPATH, then you're probably OK ... worth a try before reinstalling everything. If it fails, then I think you're better off trying what Ryan wrote.

comment:6 Changed 9 years ago by michaelld (Michael Dickens)

Resolution: invalid
Status: newclosed

You're welcome; thanks for reporting back! I'm not familiar with Docker, so I can't say whether there will be future issues. In looking through the Docker website, it looks like you might not need to set PYTHONPATH at all to use it; just PATH (with /usr/local/bin in it). Anyway, I'm glad we got this issue understood. Good luck!

Note: See TracTickets for help on using tickets.