Skip to content

Python hell

Hello guys,

In my system i have python packages from official repository and installed using pip. I have a single user. I also god knows why installed local and system wide packages using pip. Yesterday i updated the pip packages both system wide and user using this command

pip list --outdated --format=freeze | grep -v '\-e' | cut -d = -f 1 | xargs -n1 pip install -U

Now today when i update packages using pacman. Lot's of warning are shown. Can i just remove the site packages both system wide and user specific?

I happen to read the wiki about python after everything happened.

2 points10 comments
Open on Reddit
About this post
Posted
Archived
Score
2 · 67% up
Kind
Text
ID
iamqlm

Author

10
posts
59
comments
1
media
View profile

10 comments

It's a good thing, now you know that you better use python -m venv then use pip inside a venv instead of mixing python packages from pip and pacman :)

15 points

Also consider pipenv. It's a nice virtualenv wrapper that I found to be pretty comfortable

1 points

Try to uninstall the packages from pip that are also installed in pacman

3 points

I also done it with some package, but pip don't remove the files. And causes pacman to show file exist error. Can i just delete the site-package folder in python.

2 points

If the package isn't registered in pip then it should be safe to remove the files

2 points
unknown author

Local stuff is in .local/{bin,lib} The rest is in /usr/lib/python3.8/site-packages. I'd delete all things in those dirs first. Then download all python packages via pacman using pacman -S $(pacman -Qq | grep python- )

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