W3docs

python setup.py uninstall

The command python setup.py uninstall is not a built-in command in Python and it may not work as expected.

The command python setup.py uninstall is not a built-in command in Python and it may not work as expected.

To uninstall a package in Python, you can use the pip package manager by running the following command:

Uninstall a package by pip

pip uninstall package_name

<div class="alert alert-info flex not-prose"> Watch a course <span class="hidden md:block">Watch a video course </span> Python - The Practical Guide</div>

For example, to uninstall the package numpy, you would run:

Uninstall the numpy package by pip

pip uninstall numpy

Alternatively, you can use !pip if you are running the command from Jupyter notebook or IPython.

Uninstall the numpy package by pip from Jupyter notebook or IPython

!pip uninstall numpy

Please note that you might need sudo or administrator privilege for it to work.