rbreaves / kinto

Mac-style shortcut keys for Linux & Windows.
http://kinto.sh
GNU General Public License v2.0
4.24k stars 212 forks source link

Default install broken when using Python 3.7 in Ubuntu & elementary OS #529

Open addiebarron opened 3 years ago

addiebarron commented 3 years ago

Describe the bug When using Python 3.7 in Elementary OS 5.1.7 (Ubuntu-based), the GUI application encounters the following error:

> ~/.config/kinto/gui/kinto-gui.py

Traceback (most recent call last):
  File "/home/addie/.config/kinto/gui/kinto-gui.py", line 3, in <module>
    import gi,os,time,fcntl,argparse,re
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 42, in <module>
    from . import _gi
ImportError: cannot import name '_gi' from 'gi' (/usr/lib/python3/dist-packages/gi/__init__.py)

The issue can be fixed with the following command from this StackOverflow thread:

sudo ln -s /usr/lib/python3/dist-packages/gi/_gi.cpython-{36m,37m}-x86_64-linux-gnu.so

Which symlinks the gi library file to one with the Python 3.7 naming convention.

This issue can be closed but I hoped to leave documentation of the fix here in case others are searching.

Install Type: Bare Metal Distro: elementary OS 5.1.7 DE: Pantheon Branch: master

rbreaves commented 3 years ago

That is interesting, thank you for that surgical fix. I will leave this open as well as I will try and get this added based on whether those paths exist or not, just not sure if they should only be symlinked under 3.7 or other versions. I think others had installed additional python related packages - but this does seem better.

kram202 commented 11 months ago

Doesn't work for me. And I get gi module not found while running ~/.config/kinto/gui/kinto-gui.py

RedBearAK commented 11 months ago

@kram202

You can try installing this alternate project. It's very much like Kinto, and based on Kinto's config file, but with a completely different installer.

https://github.com/RedBearAK/toshy

I've been able to get it to install even on some distros that are still using Python 3.6.8 or 3.6.9, like CentOS 7. But if your primary python3 command is actually version 3.7, it would probably work best to run the setup script with a newer version of Python if you have one installed, like:

python3.10 ./toshy_setup.py

If you have any trouble with it, open an issue on the Toshy repo, and describe your specific environment:

https://github.com/RedBearAK/toshy/issues/