Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] If pint is not installed, suggest user restarts ulauncher after install #43

Open
mattalxndr opened this issue Dec 16, 2022 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@mattalxndr
Copy link

Describe the bug

The message reminding the user to install pint does not also suggest that the user restarts ulauncher to get around the error, but it is necessary (at least is was for me).

To Reproduce

Steps to reproduce the behavior:

  1. Install extension but do not install pint
  2. Open ulauncher and type =
  3. Notice a message saying something like "Install pint by running pip install pint"
  4. Install pint by running pip install pint.
  5. Open ulauncher and type =

Expected behavior

I expect newly installed pint to be recognized, since I followed the directions.

What happened instead

  1. Got the same message saying "Install pint by running pip install pint"
  2. Start fiddling with it to get it to work, which starts with restarting ulauncher process.
  3. Notice that there is no more error message about pint

Logs

Sorry I don't have logs, please let me know if you actually need them for this.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information)

  • OS: [e.g. Ubuntu Linux 20.04 ]
    • Linux: If you don't know the version, these commands may help: cat /etc/os-release lsb_release -a hostnamectl
~ % uname --all
Linux m 6.0.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 08 Dec 2022 11:03:38 +0000 x86_64 GNU/Linux
~ % cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
LOGO=archlinux-logo
~ % lsb_release -a
LSB Version:    n/a
Distributor ID: Arch
Description:    Arch Linux
Release:        rolling
Codename:       n/a
~ % hostnamectl
Static hostname: m
Icon name: computer-laptop
Chassis: laptop 💻Machine ID: ac2d7008d3874e7292bcc4dfcb25d7d7
Boot ID: 17c682032a2147a88df688bb7d6b5fd7
Operating System: Arch Linux
Kernel: Linux 6.0.12-arch1-1
Architecture: x86-64
Hardware Vendor: Dell Inc.
Hardware Model: XPS 13 9300
Firmware Version: 1.15.0

Additional context

Add any other context about the problem here.

@mattalxndr mattalxndr added the bug Something isn't working label Dec 16, 2022
@github-actions
Copy link

Issue has been marked as stale due to no activity

@github-actions github-actions bot added the stale label Feb 15, 2023
@Danie10
Copy link

Danie10 commented Aug 4, 2023

I'm seeing the same on Manjaro KDE. But although Python says the requirement is already satisfied, restarting ULauncher just shows the same message needing pint installed.

@github-actions github-actions bot removed the stale label Aug 5, 2023
@guvkon
Copy link

guvkon commented Feb 23, 2024

I'm seeing the same on Linux Mint 21.3 Cinnamon. Python requirements are installed like so:

$ pip install Pint simpleeval parsedatetime pytz
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: Pint in ./.local/lib/python3.10/site-packages (0.23)
Requirement already satisfied: simpleeval in ./.local/lib/python3.10/site-packages (0.9.13)
Requirement already satisfied: parsedatetime in ./.local/lib/python3.10/site-packages (2.6)
Requirement already satisfied: pytz in /usr/lib/python3/dist-packages (2022.1)
Requirement already satisfied: typing-extensions in /usr/lib/python3/dist-packages (from Pint) (3.10.0.2)

Re-launching Ulauncher doesn't help at all.

@kitnerboy
Copy link

I've met this same problem on my Ubuntu 22.04.4 LTS
Everything looks like packet is yet installed but it somehow fails.
What i discovered is if I just run python interactive console i can import pint with no problem.
Finally what I discovered is that i had two installs of pint - one from pip install and one from apt.
I deleted pint that was from apt (as it was quite old and couldn't handle import Self from typing_extensions) and reinstalled or upgraded the one from pip.
And I now can use this plugin flawlessly.

@tchar
Copy link
Owner

tchar commented Mar 28, 2024

How did you install the plugin?

Depending on your system and python version pip may refer to pip for python2 and pip for python 3. You may have installed pint for the wrong python version.

To make sure you use the proper one try using python3 -m pip install pint.

Let me know if this helps.

EDIT: The extension tells you to restart the launcher.
EIDT2: #51 changes these suggestions to /usr/bin/python3 -m pip install. The reason is that ulauncher uses #!/usr/bin/python3 to run.

@guvkon
Copy link

guvkon commented Mar 28, 2024

Didn't help.

$ /usr/bin/python3 -m pip install pint 
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pint in ./.local/lib/python3.10/site-packages (0.23)
Requirement already satisfied: typing-extensions in /usr/lib/python3/dist-packages (from pint) (3.10.0.2)

EDIT:

$ which python3
/usr/bin/python3

@runew0lf
Copy link

yeah i cant get it to work no matter what on linux mint too

Requirement already satisfied: pint in /usr/local/lib/python3.10/dist-packages (0.23)
Requirement already satisfied: typing-extensions in ./.local/lib/python3.10/site-packages (from pint) (4.11.0)

same as the guys above, wont detect pint at all

@beau4236
Copy link

Not working on Mint... halp!

@tchar
Copy link
Owner

tchar commented May 28, 2024

Could this be due to Ulauncher using a different Python version than your system? Did you install it via Flatpak or another way other than the .deb file?

I don't have Mint, but it looks like the Ulauncher you run possibly runs via a different Python interpreter that does not have Pint installed.

@runew0lf
Copy link

runew0lf commented May 30, 2024

Ulauncher 5.15.7 system package for Ulauncher
Python 3.10.2

@tchar
Copy link
Owner

tchar commented Jun 12, 2024

@runew0lf I have installed Mint on a VirtualBox machine and I have tried some things to figure out what is the problem.

So on a first note when I run

python3
import pint

I get the following error:

image

I am not sure how this issue came to be. It looks like it is an issue others face, as well as other projects. I updated the typing-extensions like this:

python3 -m pip install --upgrade typing-extensions

This allows pint to be imported, but it is still not working on Ulauncher. I then removed it and upgraded the system package (generally not recommended)

sudo python3 -m pip install --upgrade typing-extensions

I can still import it if I run Python3 from the terminal, but Ulauncher refuses to cooperate.

I will need some time to dig into what is happening here because Ulauncher probably messes up with the sys /usr/bin/launcher. If, in the meantime, you have any idea we can go forward with this, feel free to comment.

@Finyti
Copy link

Finyti commented Jun 17, 2024

Linux Mint 21.3 Cinnamon
Ulauncher 5.15.7
Python 3.10.12

Same issue. No matter where or how pint is installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants