Fixing Ulauncher after upgrading Python on Arch Linux #1280
friday
announced in
Troubleshooting
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Arch Linux installs Python packages per Python version to
/usr/lib/python{PYTHON__VERSION/site-packages/{PACKAGE_NAME}
. These packages can normally only be imported for the specific Python versions they are installed.When Arch upgrades Python versions (like 3.11 to 3.12), it also reinstalls all python system packages to the new directory. But it doesn't reinstall AUR packages, so you have to do that yourself.
To do that, you also need to make sure you do a clean reinstall. One of these commands should do it, depending on if you use an AUR helper or not:
paru -S ulauncher --rebuild
yay -S ulauncher --answerclean All
git clone https://aur.archlinux.org/ulauncher.git && cd ulauncher && makepkg -isC
Replace ulauncher with ulauncher-git if you are using the ulauncher-git package (for the last command, replace in the git clone command, not the cd command)
To get a list of other packages affected after upgrading Python versions, you can run
pacman -Qoq /usr/lib/python{PREVIOUS_PYTHON_VERSION}
References:
https://wiki.archlinux.org/title/python#Module_not_found_after_Python_version_update
https://www.reddit.com/r/archlinux/comments/rf6c84/psa_python_310_is_in_core_rebuild_your_aur/
Beta Was this translation helpful? Give feedback.
All reactions