What is the process of uninstalling a package installed with Pip Install- - user?

446    Asked by ChloeBurgess in Python , Asked on Sep 14, 2023

I used a user option for pip for installing the Python package: 

pip install --user [python-package-name]

But I do not have any root access. So, when I tried to uninstall the installed package, I tried to run the command mentioned below: 

pip uninstall --user [python-package-name]

But now I am getting the error: 

no such option: --user

I need to know how to uninstall the package and not find the same and delete it. 

Answered by Danilo Guidi

I have tested a formula to uninstall pip in the Python 3.5 version, where I used pip 7.1.2 on Linux. I am explaining the outcome here: Some package installs this: $HOME/.local. In that case, uninstalling the same can work properly. If you install the pip uninstall package at both places, only the local package gets uninstalled. So, when you need to uninstall the package system-wide using pip, uninstall it locally, then run the uninstall command with root access. However, remember some pip install-target somedir can install the package into somedir. In that case, uninstalling is not an option. You will need to run the pip uninstall as the respective user as system-wide and predefined user-local are the only places pip will uninstall from.






Your Answer

Interviews

Parent Categories