#[CLOSED] Removing modules installed with pip

1 messages · Page 1 of 1 (latest)

olive nymph
#
ls ~/.local/lib/
#

If you did not change the default global user installation path for pip, then there are no user-installed python packages on your system, so there is nothing to remove.

glacial aurora
#

i did sudo pip

#

:|

#

there was some permission error in venv

glacial aurora
olive nymph
glacial aurora
#

:( my bad

#

where would the files be

olive nymph
# glacial aurora where would the files be

Find stray files first.
Then find what you installed by piping from shell history
Finally, run a pacman checksum and reinstall these modified python packages from repo.

glacial aurora
glacial aurora
#

sudo?

olive nymph
#

However, you may find paccheck from pacutils more convenient.

olive nymph
# glacial aurora sudo?

This command lists all packages with a mismatching checksum.

sudo paccheck --sha256sum --list-broken
glacial aurora
olive nymph
#

The lostfiles package from repo can be used to find lost files. It should also be run as root.

olive nymph
glacial aurora
#

nice

#

how long do i have to wait

olive nymph
#

If the package you installed with pip has changed the system python package, paccheck can find this out, and these newly added files can be picked up by lostfiles.

olive nymph
glacial aurora
#

vlc 🗿

#

but in this case i only want to remove pycairo do i do which pycairo and delete the path

olive nymph
glacial aurora
#

and im going to ignore that

olive nymph
#

fortunately you haven't installed a Python package that conflicts with what Pacman manages.

#

yes

olive nymph
#

sudo pip, never do that again

glacial aurora
#

so sudo pip uninstall pycairo?

glacial aurora
#

one last time ig

olive nymph
glacial aurora
#

i think there should be something in here?

olive nymph
#

Would you kindly run

lostfiles

and post the output?

glacial aurora
olive nymph
# glacial aurora ohh sorry i thought it was just part of the paccheck command

Doesn't seem right,the output should include something like this part

/usr/lib/python3.11/site-packages/cairo
/usr/lib/python3.11/site-packages/cairo/__init__.py
/usr/lib/python3.11/site-packages/cairo/__init__.pyi
/usr/lib/python3.11/site-packages/cairo/__pycache__
/usr/lib/python3.11/site-packages/cairo/__pycache__/__init__.cpython-311.pyc
/usr/lib/python3.11/site-packages/cairo/_cairo.cpython-311-x86_64-linux-gnu.so
/usr/lib/python3.11/site-packages/cairo/include
/usr/lib/python3.11/site-packages/cairo/include/py3cairo.h
/usr/lib/python3.11/site-packages/cairo/py.typed
/usr/lib/python3.11/site-packages/pycairo-1.24.0.dist-info
/usr/lib/python3.11/site-packages/pycairo-1.24.0.dist-info/COPYING
/usr/lib/python3.11/site-packages/pycairo-1.24.0.dist-info/COPYING-LGPL-2.1
/usr/lib/python3.11/site-packages/pycairo-1.24.0.dist-info/COPYING-MPL-1.1
/usr/lib/python3.11/site-packages/pycairo-1.24.0.dist-info/INSTALLER
/usr/lib/python3.11/site-packages/pycairo-1.24.0.dist-info/METADATA
/usr/lib/python3.11/site-packages/pycairo-1.24.0.dist-info/RECORD
/usr/lib/python3.11/site-packages/pycairo-1.24.0.dist-info/REQUESTED
/usr/lib/python3.11/site-packages/pycairo-1.24.0.dist-info/WHEEL
/usr/lib/python3.11/site-packages/pycairo-1.24.0.dist-info/top_level.txt
#

I just did sudo pip install pycario in a VM to see what would happen.

#

For your information, pycario is included by pacman in the python-cario package.

pacman -Q python-cario
#
stat /usr/lib/python3.11/site-packages/cairo
glacial aurora
#

did i f up my system? :(

olive nymph
#

Sorry it's

pacman -Q python-cairo
glacial aurora
#

ooh thx

#

it doesn't say [installed] even i reinstalled it

olive nymph
#
stat /usr/lib/python3.11/site-packages/pycairo*.dist-info
#

Then nothing needs attention, your system is fine.

glacial aurora
#

nice :)

#

thx

#

but why it doesnt say installed tho

olive nymph
#

And **DO NOT **run sudo pip uninstall pycario as you already have the pycario from pacman.

olive nymph
glacial aurora
glacial aurora
#

ah okay must have been another command thank you