2

I'm using Linux/Manjaro KDE.

Since I was not familiar with Venv I installed more than 50 packages in my global and not everything is conflicted. In order to clean up all pip packages I tried this command:

pip freeze | xargs pip uninstall

and even this one:

python -m pip freeze > requirements.txt
python -m pip uninstall -r requirements.txt

In both cases I get this error:

ERROR: Cannot uninstall 'apparmor'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

and then the progress will be interrupted. Any solution?

Levi
  • 67
  • 8
  • Try deleting the packages that are giving you the errors manually. If you're root you will find them here `/usr/local/lib/python3.9/site-packages/`; Else you can find them here `/home/normaluser/.local/lib..` – Enrico Nov 27 '21 at 11:10
  • I also suggest you to look at this StackOverflow question: https://stackoverflow.com/questions/11248073/what-is-the-easiest-way-to-remove-all-packages-installed-by-pip – Enrico Nov 27 '21 at 11:13
  • @Enrico Manjaro is using some packages for itself and I think if you do that you will get some OS issues with Manjaro. Already saw the link you posted, couldn't solve the problem – Levi Nov 27 '21 at 11:14
  • hmm got it, since you're using a virtual enviroment, did you try this? `virtualenv --clear MYENV` – Enrico Nov 27 '21 at 15:42
  • Read the question again @Enrico :) I didn't use virtualenv – Levi Nov 27 '21 at 16:30

1 Answers1

0

I could remove everything like this: To get room permissions:

sudo su

and then removed anything on this location:

/usr/local/lib/python3.9/site-packages/
Levi
  • 67
  • 8
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 06 '21 at 12:58