0

I am trying to install GNURadio through PyBOMBS in a virtualenv. When I run pybombs prefix init ~/prefix -a myprefix -R gnuradio-default, the installation fails with

-- Python checking for pygtk >= 2.10.0 - not found

After seeing this, I tried to install PyGTK. I first installed pycairo through pip using instructions from this GitHub issue, then pygobject with pip install pygobject. After doing these two things, I am able to import cairo and import gi but unable to import gobject. However, I successfully built and installed pygtk from source following these instructions.

After installing these things, the PyBOMBS installer still yields the same error message about not finding PyGTK. I have linked the full PyBOMBS output here.

I have also tried installing python-gtk2-dev, python-gi, python-gi-cairo, and gir1.2-gtk-2.0 through apt, though I would prefer not to install packages globally if possible. PyBOMBS yielded the same output after installing those apt packages.

I've been ripping my hair out over this for the last two days, so I greatly appreciate any and all suggestions y'all have :)

rytse
  • 133
  • 1
  • 10

1 Answers1

1

I am assuming that the PyBOMBS tool will install any required dependencies so you should not have to.

I ran the following commands which seemed to work on an Ubuntu 16.04 system.

virtualenv venv
source venv/bin/activate
pip install pybombs
pybombs auto-config
pybombs recipes add-defaults
pybombs prefix init ~/prefix -a myprefix -R gnuradio-default

Edit: After checking my logs I realized that I was mistaken, and that the build process hadn't even started, and I had a similar errors as the OP.

After consulting Installing PyGtk in virtualenv I added the following symlinks in my venv/lib/python2.7:

ln -s /usr/lib/python2.7/dist-packages/gtk-2.0/gio/
ln -s /usr/lib/python2.7/dist-packages/glib
ln -s /usr/lib/python2.7/dist-packages/gobject
ln -s /usr/lib/python2.7/dist-packages/gtk-2.0/gtk
ln -s /usr/lib/python2.7/dist-packages/gtk-2.0/
ln -s /usr/lib/python2.7/dist-packages/lxml
ln -s /usr/lib/python2.7/dist-packages/pygtk.pth
ln -s /usr/lib/python2.7/dist-packages/pygtk.py
ln -s /usr/lib/python2.7/dist-packages/PyQt4

After rerunning pybombs prefix init ~/prefix -a myprefix -R gnuradio-default this successfully managed to build.

Note: Creating the virtualenv with --system-site-packages did not work as pybombs failed on assertions.

bohrax
  • 1,051
  • 8
  • 20
  • After my post yesterday, I installed GNRadio with pybombs outside of any virtualenv. Thus, my system should have all dependencies. However, today I tried installing GNURadio again in a virtualenv using exactly your commands (except changing the prefix, using `pybombs prefix init ~/vep -a virtpref -R gnuradio-default` instead). I still got the PyGTK not found error. PyBOMBS output [here](https://gist.github.com/rytse/b9b63723bdf1791fb086e053763879d2) – rytse Aug 08 '18 at 13:37
  • I did not see the output from the two preceding pybombs commands in your output but I am not sure if they are relevant either. Can you run my commands in a clean virtualenv from scratch? – bohrax Aug 08 '18 at 15:26
  • The installation fails in the same way (PyGTK not found) in a clean Ubuntu 16.04 VM. After running `sudo apt update; sudo apt -y upgrade; sudo apt install python-virtualenv`, I ran the exact set of commands you linked above and got [this](https://gist.github.com/rytse/3c3b054ca0c68e64d579ed081b7d735b) output. – rytse Aug 09 '18 at 12:04
  • Not sure why the pybombs script fails to install some required gtk libs. I did not see any reference to `libgtk2.0-dev` and `libgtk2.0-0` which I think are required. Try to install them using `apt install`. I am pretty sure that I had them installed before running my installation. – bohrax Aug 09 '18 at 14:59
  • [Same error](https://gist.github.com/rytse/9672ecc00b8d4613c7121e572115b066), `Python checking for pygtk >= 2.10.0 - not found` – rytse Aug 09 '18 at 15:20
  • Ok, [here are my installed gtk packages](https://gist.github.com/bohrax/e0c9131c8365ae8fd1c6d2b2f28e8802#file-gistfile1-txt). When checking your output it seems like it depends on gtk3 as well. Perhaps you can test to install e.g. `libgtk-3-0` – bohrax Aug 10 '18 at 16:48
  • Still no dice, same pygtk error. Output [here](https://gist.github.com/rytse/80d93856f69f2c0f377c74e4dcd190a4). – rytse Aug 10 '18 at 17:45
  • I added some links to installed packages in the virtualenv. This seemed to workaround the problems so far (still building.). Not sure if this is helpful, as it is does not fully isolate the installation to a virtualenv. – bohrax Aug 10 '18 at 18:53