Screwed my python install -I think- by installing python packages with sudo (no venv)

I have a screwed python install. My status bar using i3pystatus is not working. Neither subliminal. I think python scripts are giving errors. This is probably due to the fact that I had the lazy and stupid habit of installing pip packages with sudo instead of creating a Virtual Environment, as adviced here: https://archived.forum.manjaro.org/t/install-python3-pip/106410/4?u=kamazeuci

Now I think my whole python install is screwed, I just want to clean it up and start from scratch, but I am not sure where to start, and I guess can't just wipe my system from all python related, because there are critical packages involved.

Should I just install Manjaro again from scratch?

thanks

It sorta depends what you have on there and whether its interfering with packages.
Can you perform an update ? sudo pacman -Syyu
If I were you I might create a pkglist of currently installed packages.
sudo pip uninstall (or whatever) you need to clean out your pip weirdness.
And then do a force reinstall of your pkglist.

thanks @cscs!
I can update with pacman and yay, no problem.
I uninstalled everything in pip, then I tried to install python packages inside a virtual environment, but didn't work, python apps installed through yay AUR didn't recognize the packages installed through pip virtual environment.

I am confused ... venv are for things like developing or to have an isolated environment for a python project or group of python programs. They should stay separate from packages .. thats kinda the whole point.
What are you trying to do ?
Have you looked at the Archwiki ?
https://wiki.archlinux.org/index.php/Python#Package_management
https://wiki.archlinux.org/index.php/Python/Virtual_environment

What I am trying to do is have things tidy up the way they are supposed to be. Yes, I have looked at the Arch Wiki regarding python package installing. I first try to search the package with yay. If it is not available, then I should install with pip. The problem is that I used sudo to install pip in the past, but the Arch Wiki says you should set up a virtual environment and not use sudo with pip to install python packages. I've made that mistake but I don't know how to revert it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by