Skip to content

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.

94 points

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 -S

92 points

Thanks for your tip !

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).

17 points

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.

3 points

I was getting EOL with this method, then I tried this one from the Wiki. Using -Qqo, though

Thanks for the heads-up, I'd never thought of doing that!

3 points

What's a good way to clean these old packages? Just delete everything in /usr/lib/python3.7/site-packages/?

2 points

I’d rather do this, as it doesn’t change which packages are explicitly installed

pacman -Qdqo /usr/lib/python3.7/ | xargs yay -S --asdeps
pacman -Qeqo /usr/lib/python3.7/ | xargs yay -S
-1 points

Here I was wondering why I had 400 new packages to upgrade since yesterday :)

7 points

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?

6 points

Because of the compiled bytecode and binary extensions

25 points

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.

20 points

Heads up, tensorflow has compatability issues with Python 3.8 as of November 14.

20 points
unknown author

Deleted before we saved it.

4 points

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])

13 points

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).

$ pactree -r python2
python2
├─bzr
│ └─devtools
├─gconf
│ └─spotify
├─inkscape
├─kodi-bin
│ └─kodi
│   └─kodi-bin
├─python2-cairo
│ └─pygtk
│   └─gimp
├─python2-gobject2
│ └─pygtk
├─python2-pillow
│ └─kodi
├─python2-pycryptodomex
│ └─kodi
└─python2-simplejson
  └─kodi
4 points

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

10 points

I still dont see the update. I think my mirrors are mostly german.

6 points

My virtual environments broke after upgrade. It never happened before.

10 points

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.

11 points

Came home to 327 available updates after updating before work this morning. God I love this distro lol

6 points

We don't see this in other distros because they don't allow smoothly upgrading from one python version to another

5 points

Anyone else having problems with poetry after 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 package

3 points

Is firewalld not working for anyone else?

2 points

is a problem with nftables, it was already updated.

4 points

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'

Anybody has an idea?

1 points
python -c 'import pip._vendor.cachecontrol; print(repr(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.

3 points

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.

3 points

mine is

➜  ~ ls -R /usr/lib/python3.8/site-packages/pip/_vendor/                                
/usr/lib/python3.8/site-packages/pip/_vendor/:
__init__.py  __pycache__

/usr/lib/python3.8/site-packages/pip/_vendor/__pycache__:
__init__.cpython-38.pyc

1 points

Same for me

➜  ~ 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'
1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.