Yup. Nothing like a repo package anyway…
But that should have meant ythe directory was removed.
(on my system I have never removed an old python directory, like 2.7 etc)
So … it is possible something is relying on it …
you didnt …
Do that, for anything but list, right?
Do not use sudo with pip
So you have not removed 3.9 yet?
In any case … you can freely remove (through pip and/or manually deleting directories) old python version stuff or anything you dont want.
So…
yes.
Now this is odd. I am inclined to say yes, as nothing owns it … but I still wonder why it exists.
(as noted above these directories usually are removed along with the python package)
Ah, my mistake… I should have included the full commands I ran from the stable “wiki” post…
… so one of my commands was run with sudo as recommended
$ sudo pip freeze > pip_list_sudo.txt
$ pip freeze --user > pip_list_user.txt
That’s good news, I was hoping that was the case!
The only time I’ve experienced something like this (under Windows) was when a file was locked or in use or not part of the uninstall script… and usually folders refuse to delete so long as there are any files inside. But as you can see from the folder that the vast majority of the /usr/lib/python3.9 folder was removed… with the exception of one file that prevented its parent folders from being removed.
Honestly its just kinda silly to do that.
First because, again, users should not invoke sudo with pip. So there should be no ‘sudo pip’ packages.
But second because … that list will be largely useless because of listing all sorts of system packages that rely on python but are from the repos and not pip (example: ufw,gufw) …
I always appreciate your feedback @cscs . Being a relatively new to gnu/linux user still… I always make sure to post my questions if something looks questionable. Whether that be a command or the end result of a command.
But as the commands I ran were just generating lists, I wasn’t too concerned about them as it was my intention to follow one sage piece of advise…
… i.e. no plan to run sudo pip install -r pip_list_sudo.txt in my case.
Okay… so just to circle back to my original question/resolution… I won’t miss anything listed (pre-update) via python 3.9 pip freeze --user > pip_list_user.txt so I can feel good about $ rm -rdv /home/<userid>/.local/lib/python3.9?
And although it’s odd one file was left in /usr/lib/python3.9… I can remedy that with $ sudo rm -rdv /urs/lib/python3.9?
that’s a really positive attitude i switched to testing branch 2 days ago so i had got this update but came to know about this pip stuff just know (missed the testing announcement earlier). i have no aur package that uses python. the system python packages were automatically upgraded and i manually upgraded the ones installed via pip. important thing is nothing is broken (yet)
I thought I’d share what I’ve written down about my understanding of the whole python update/readiness process… but as I wasn’t able to figure out how to upload an ODT/PDF, maybe a screenshot would be appreciated.
Thats not really what that line says. Its closer to saying ‘do this but with caution’.
Thing is … there is no real case for doing that … it only produces false results and then 'sudo pip install’s everything on that list - which would be bad for any pip package on any day, but even worse now that you would be attempting to overwrite repo packages as well. sudo pipmay make sense only in the case that someone properly set up a virtual environment.
But that wasnt mentioned anywhere in those instructions so I have to conclude it was simply written out of a fundamental misunderstanding.
Ultimately those notes should not have been added in that form at all.
As for “the next line”, I should have said “the next few lines”.
Depends when/where it was copied from my original version;
I did strengthen the “don’t do it” message later on, IIRC.
I wrote it in the 2021-12-28 testing announcement, and expected problems to be picked up there.
Was working it out for myself, as I thought I might have installed some in system python by mistake.
Later in the process I found that pip freeze picks up packages that pip did not install, as you can read here
Years ago I followed the advice on pip.pypa.io and many other places, simply “pip install package”, which must be intended for Windows users, as it fails in Linux with a permission error. When it failed I simply used sudo, didn’t know it was dangerous. And last week I was forgetting that there had been malware on PyPI.