vonshednob / pter

Manage your todo.txt in a commandline user interface (TUI)
https://vonshednob.cc/pter/
MIT License
102 stars 6 forks source link

qpter not finding PyQt5 under python3 (No longer easily available under pip install) #66

Closed jason-mehmel closed 3 months ago

jason-mehmel commented 3 months ago

(worth noting: pter works with pipx install. This is only for qpter)

Recently upgraded my machine, to BunsenLabs Boron / Debian Bookworm.

Wanted to reinstall pter and qpter after upgrading, finding pip install no longer easily available. (There is an 'externally managed environment' warning and it doesn't install. It either suggests creating a virtual environment, or using pipx, which streamlines that process.)

I used pipx install pter and PyQt5, both with success. (I had to delete the older .local files, but otherwise it worked.)

But trying to run qpter gets an error:

PyQt5 is not installed or could otherwise not be imported: No module named 'PyQt5'

I'm guessing the virtual environment pipx is creating for pter and qpter doesn't 'see' the virtual install of PyQt5.

Notably, I do have python3-PyQt5 installed already. I'm not sure what could be tweaked to let qpter 'see' the things it needs over there?

Some more architecture info: Kernel: 5.10.0-28-amd64 arch: x86_64 bits: 64 compiler: gcc v: 10.2.1 Distro: BunsenLabs GNU/Linux 12 (Boron) base: Debian GNU/Linux 12

vonshednob commented 3 months ago

Hm, good point. I should really make qpter work nicely with pipx. I'll try to fix this within the next few days!

vonshednob commented 3 months ago

Alright, it's fixed! Also added a section to the documentation about the installation via pipx -- note that it's not sufficient to run pipx install pter to get it running with qpter; you will have to write pipx install pter[qt] to also add QT to that pipx virtual environment.

The updated version is 3.16.2, so it should "just work" now. Let me know if there are still problems!

jason-mehmel commented 3 months ago

Ummm... the pipx install command worked, but I'm getting this now when attempting to run qpter:

Traceback (most recent call last): File "/home/jason/.local/pipx/venvs/pter/lib/python3.11/site-packages/pter/qtui.py", line 1257, in update_search self.searcher.parse() File "/home/jason/.local/pipx/venvs/pter/lib/python3.11/site-packages/pter/searcher.py", line 322, in parse self.casesensitive.can_lowercase(''.join(self.contexts | self.not_contexts)): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'bool' object has no attribute 'can_lowercase' Aborted

jason-mehmel commented 3 months ago

Not sure if that's something wrong with my machine or qpter.

(Also not sure if I should open a new issue!)