I think you just have to change the second command with pacman -Qqo /usr/lib/python3.7/ | xargs -L1 yay --noconfirm -S to avoid problems when yay ask for your confirmation to update each package (Proceed with installation? [Y/n] Error installing repo packages).
This will miss anything that just has a binary or shared library which links to the old libpython3.7m.so.1.0 and needs to be rebuilt to point at 3.8 instead, though that might be quite uncommon. I ran into it with gdb-multiarch, which doesn't include any .py files but does link to the python lib on its binary.
I just did an ldd /usr/lib/**.so /usr/bin/* and piped it to vim and searched for python3.7, because I didn't want to think of how to do it in the shell.
Isn't Python 3 backwards compatible with all Python 3 stuff? So 3.8 should run 3.1 stuff without modification? Why not just make a generic directory for python 3 and always reference that?
Many many thanks to Arch and Felix Yan in particular 謝謝!(python packager), and anyone else (no doubts many) who aided in this large and apparently smooth uphill path! (now if the last vestiges of python2 dependency could just be resolved ...looking at you wicd [wink])
I've still got a few to go. kodi, bzr (not that I use it but I use other devtools), inkscape, gimp, and the long-dead gconf that Spotify depends on for some reason (and it almost certainly doesn't use the one Python script from gconf that is the only reason it depends on Python).
I probably did sudo pacman -Syu 10 times this last hour, and python 3.7.4-2 still seems to be the latest version. Did I miss anything? Is the first mirror in my mirrorlist lying to me or is too slow on the updates?
Edit: Nevermind, http://archlinux.cu.be/$repo/os/$arch seems to lag behind a tiny bit. lol
Yeah, at some point venv bins started softlinking to the full name of the python interpreter instead of the short name (I think it used to default to just linking to python3 instead of python3.7, but maybe it's always been this way?), so this happens every time the full binary's name changes (e.g. it happened with /usr/bin/python3.6 being replaced by /usr/bin/python3.7, and will happen again with 3.8 to 3.9).
python -mvenv includes an option, --upgrade which updates the binaries in the virtual environment to point at the new binary name, but make sure you specify all the other options you used at creation time (like --system-site-packages, etc.) because it resets all those.
But all your python modules are going to still be installed into the (now ignored) lib/python37 folder. It's probably safest to just reinstall them via pip to get them into the python38 folder since it's easier than trying to guess which ones have linked libraries or python37 paths hardcoded into them, so I don't feel like a venv 'upgrade' actually buys you anything over just deleting the environment and recreating it from scratch.
EDIT: Actually, I'm probably totally wrong / confused about the binary name thing, as a result of having had multiple venv combinations of --symlinks vs --copies and with manually specified interpreters via virtualenv over the years. Regardless, once you have a working interpreter in your virtual environment (maybe even with no upgrade required in the virtual environment) you end up with a situation where all your virtual environment's modules are sitting in lib/python3.7 and your interpreter is looking only in lib/python3.8, so you need to get them into the python3.8 directory and if they have any .so or .pyd elements with links to the old cpython libraries, you're best off reinstalling them instead of trying to copy them.
pip is not working for me anymore, I'm getting this:
root@x ~ # pip list
Traceback (most recent call last):
File "/usr/bin/pip", line 11, in <module>
load_entry_point('pip==19.2.3', 'console_scripts', 'pip')()
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
return ep.load()
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3.8/site-packages/pip/_internal/__init__.py", line 40, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 11, in <module>
from pip._internal.commands import (
File "/usr/lib/python3.8/site-packages/pip/_internal/commands/__init__.py", line 6, in <module>
from pip._internal.commands.completion import CompletionCommand
File "/usr/lib/python3.8/site-packages/pip/_internal/commands/completion.py", line 6, in <module>
from pip._internal.cli.base_command import Command
File "/usr/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 21, in <module>
from pip._internal.download import PipSession
File "/usr/lib/python3.8/site-packages/pip/_internal/download.py", line 15, in <module>
from pip._vendor.cachecontrol import CacheControlAdapter
ModuleNotFoundError: No module named 'pip._vendor.cachecontrol'
What is the contents of /usr/lib/python3.8/site-packages/pip/vendor/ ? This should never happen unless you have used sudo pip install --upgrade pip. Which you should never, ever do, for precisely this reason.
Finally found the reason : I had held back python-msgpack to an older version because of compatibility issues with Borg. Upgrading it solved the issue, though I haven't tested if Borg still works.
➜ ~ pip list
Traceback (most recent call last):
File "/usr/bin/pip", line 11, in <module>
load_entry_point('pip==19.2.3', 'console_scripts', 'pip')()
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
return ep.load()
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3.8/site-packages/pip/_internal/__init__.py", line 40, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
from pip._internal.cli import cmdoptions
File "/usr/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
from pip._internal.models.search_scope import SearchScope
File "/usr/lib/python3.8/site-packages/pip/_internal/models/search_scope.py", line 11, in <module>
from pip._internal.utils.misc import normalize_path, redact_password_from_url
File "/usr/lib/python3.8/site-packages/pip/_internal/utils/misc.py", line 24, in <module>
from pip._vendor.retrying import retry # type: ignore
ModuleNotFoundError: No module named 'pip._vendor.retrying'
91 comments
FYI, as with all major python updates, yer gonna have to rebuild your AUR stuff that relies on python. I had to do pikaur this morning.
You can find all the packages that need to be rebuilt with
pacman -Qqo /usr/lib/python3.7/.You can automate the rebuild a bit with your AUR helper (in my case yay):
pacman -Qqo /usr/lib/python3.7/ | xargs -L1 yay -SThanks for your tip !
I think you just have to change the second command with
pacman -Qqo /usr/lib/python3.7/ | xargs -L1 yay --noconfirm -Sto avoid problems whenyayask for your confirmation to update each package (Proceed with installation? [Y/n] Error installing repo packages).Or just
yay -S $(yay -Qqo /usr/lib/python3.7/)This will miss anything that just has a binary or shared library which links to the old libpython3.7m.so.1.0 and needs to be rebuilt to point at 3.8 instead, though that might be quite uncommon. I ran into it with gdb-multiarch, which doesn't include any .py files but does link to the python lib on its binary.
I just did an
ldd /usr/lib/**.so /usr/bin/*and piped it to vim and searched for python3.7, because I didn't want to think of how to do it in the shell.I was getting
EOLwith this method, then I tried this one from the Wiki. Using-Qqo, thoughThanks for the heads-up, I'd never thought of doing that!
What's a good way to clean these old packages? Just delete everything in
/usr/lib/python3.7/site-packages/?I’d rather do this, as it doesn’t change which packages are explicitly installed
Here I was wondering why I had 400 new packages to upgrade since yesterday :)
Isn't Python 3 backwards compatible with all Python 3 stuff? So 3.8 should run 3.1 stuff without modification? Why not just make a generic directory for python 3 and always reference that?
Because of the compiled bytecode and binary extensions
a) upstream Python installs to /usr/bin/pythonx.y, so since Arch follows upstream it isn't going to change that.
b) bytecode format and C ABI may change between releases, so those files on disk need to be recompiled.
This gave me a mini heart attack just now. Thanks for the heads up.
Mind sharing just how you did that, because I tried the methods listed here and, still, nothing python related works?
Sharing what?
Deleted before we saved it.
Yup. 218 packages on my end. https://i.imgur.com/ZSfDtIU.png
mirror hosts: "I felt a great disturbance in the Force..."
Heads up, tensorflow has compatability issues with Python 3.8 as of November 14.
Deleted before we saved it.
This caused me so many headaches 🙃
Many many thanks to Arch and Felix Yan in particular 謝謝!(python packager), and anyone else (no doubts many) who aided in this large and apparently smooth uphill path! (now if the last vestiges of python2 dependency could just be resolved ...looking at you wicd [wink])
I've still got a few to go. kodi, bzr (not that I use it but I use other devtools), inkscape, gimp, and the long-dead gconf that Spotify depends on for some reason (and it almost certainly doesn't use the one Python script from gconf that is the only reason it depends on Python).
Gives you a nicer output
I probably did
sudo pacman -Syu10 times this last hour, andpython 3.7.4-2still seems to be the latest version. Did I miss anything? Is the first mirror in my mirrorlist lying to me or is too slow on the updates?Edit: Nevermind,
http://archlinux.cu.be/$repo/os/$archseems to lag behind a tiny bit. lolI still dont see the update. I think my mirrors are mostly german.
Try commenting out the first link in
/etc/pacman.d/mirrorlistand see if the second one has it!It was supposed to be bleeding edge
Might be a good time to do some system maintenance.
https://wiki.archlinux.org/index.php/Mirrors
I'm a big advocate for reflector, it makes mirror management way easier.
My virtual environments broke after upgrade. It never happened before.
Yeah, at some point venv bins started softlinking to the full name of the python interpreter instead of the short name (I think it used to default to just linking to python3 instead of python3.7, but maybe it's always been this way?), so this happens every time the full binary's name changes (e.g. it happened with /usr/bin/python3.6 being replaced by /usr/bin/python3.7, and will happen again with 3.8 to 3.9).
python -mvenvincludes an option,--upgradewhich updates the binaries in the virtual environment to point at the new binary name, but make sure you specify all the other options you used at creation time (like--system-site-packages, etc.) because it resets all those.But all your python modules are going to still be installed into the (now ignored) lib/python37 folder. It's probably safest to just reinstall them via pip to get them into the python38 folder since it's easier than trying to guess which ones have linked libraries or python37 paths hardcoded into them, so I don't feel like a venv 'upgrade' actually buys you anything over just deleting the environment and recreating it from scratch.
EDIT: Actually, I'm probably totally wrong / confused about the binary name thing, as a result of having had multiple venv combinations of
--symlinksvs--copiesand with manually specified interpreters via virtualenv over the years. Regardless, once you have a working interpreter in your virtual environment (maybe even with no upgrade required in the virtual environment) you end up with a situation where all your virtual environment's modules are sitting in lib/python3.7 and your interpreter is looking only in lib/python3.8, so you need to get them into the python3.8 directory and if they have any .so or .pyd elements with links to the old cpython libraries, you're best off reinstalling them instead of trying to copy them.Oh thanks, I thought I was the only one.
Came home to 327 available updates after updating before work this morning. God I love this distro lol
We don't see this in other distros because they don't allow smoothly upgrading from one python version to another
what's that stats program on the upper right corner? looks nice.
gotop, likehtopbut better ;)https://aur.archlinux.org/packages/gotop/
Anyone else having problems with
poetryafter updating?Getting
ModuleNotFoundError: No module named 'cleo'I do see that cleo ^0.7.6 is listed as one of the dependencies, so why would it not be found?
Edit: the cleo dependency is listed in poetry's
pyproject.toml, but not for the arch packagehttps://bugs.archlinux.org/task/64484
I need to finish bootstrapping python-poetry using real packages.
I'm just glad it's being worked on, thanks for your help!
You need to rebuild your python AUR packages (
yay -S $(yay -Qqo /usr/lib/python3.7/)if using yay).Poetry is in community though
Is firewalld not working for anyone else?
is a problem with nftables, it was already updated.
pipis not working for me anymore, I'm getting this:Anybody has an idea?
What is the contents of
/usr/lib/python3.8/site-packages/pip/vendor/? This should never happen unless you have usedsudo pip install --upgrade pip. Which you should never, ever do, for precisely this reason.Finally found the reason : I had held back
python-msgpackto an older version because of compatibility issues with Borg. Upgrading it solved the issue, though I haven't tested if Borg still works.mine is
No problem here. And the error `pip._vendor.cachecontrol` is strange.
SO refers to a missing OpenSSL lib. Also mentioned here and on this github issue.
Try a `pacman -S python-pyopenssl` :)
Found that it was caused by
python-msgpack. Thanks!Same for me
Slightly offtopic, but is this mass-rebuild related: https://git.archlinux.org/svntogit/packages.git/log/trunk?h=packages/which ?
Nah it's probably just this going on: https://lists.archlinux.org/pipermail/arch-dev-public/2019-November/029721.html
Thanks! So these are probably packages which are being built in a reproducible manner.