Skip to content

Could not get blobedit.py to work on Mint 19/GTK+ #2

Description

@mscheper

I tried it in my Mint 19/Cinnamon environment. I'm not sure if PyGUI is supposed to work with GTK 3 or 2, so I tried installing both, although maybe I messed something up.

$ sudo apt install libgtk-3-dev python-gtk2
$ cd $git
$ git clone https://github.com/gcewing/PyGUI.git
$ cp -a PyGUI/Demos/BlobEdit $my_projects
$ cd $my_projects/BlobEdit
$ python3 -m venv venv
$ . venv/bin/activate
$ pushd $git/PyGUI
$ python setup.py install
[lots of output; nothing scary-looking; exit status 0]
$ popd
$ python blobedit.py
Traceback (most recent call last):
  File "blobedit.py", line 16, in <module>
    from GUI import Application, ScrollableView, Document, Window, Cursor, rgb
  File "$my_projects/BlobEdit/venv/lib/python3.6/site-packages/GUI/__init__.py", line 54, in <module>
    raise ImportError("Unable to find an implementation of PyGUI for this installation")
ImportError: Unable to find an implementation of PyGUI for this installation

I eventually got past that exception, like this:

$ pip install vext
$ pip install vext.gi
$ pip install PyGObjectg

But then I got stuck with:

$my_projects/BlobEdit/venv/lib/python3.6/site-packages/GUI/__init__.py:49: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  __import__(_testmod)
Traceback (most recent call last):
  File "blobedit.py", line 16, in <module>
    from GUI import Application, ScrollableView, Document, Window, Cursor, rgb
  File "$my_projects/BlobEdit/venv/lib/python3.6/site-packages/GUI/__init__.py", line 74, in <module>
    from GUI.Colors import rgb
  File "$my_projects/BlobEdit/venv/lib/python3.6/site-packages/GUI/Colors.py", line 5, in <module>
    from gtk import Style
ImportError: cannot import name 'Style'

I tried it in a new venv with --system-site-packages, but this didn't help. And of course, I don't want to run PyGUI's setup.py without a venv.

Advice would be appreciated, and I suggest you add solutions for problems like this in README.md, especially until #1 is resolved.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions