I am going through the Learn Python the Hard Way, 2nd Edition book, and I am stuck on this problem: "Use your setup.py to install your own module and make sure it works, then use pip to uninstall it."
If I type
setup.py install
in the command line, I can install the module.
But when I type
pip uninstall setup.py
it says:
Cannot uninstall requirement setup.py, not installed
The pip package index says, http://pypi.python.org/pypi/pip, says:
pip is able to uninstall most installed packages with pip uninstall package-name.
Known exceptions include pure-distutils packages installed with python setup.py install >(such packages leave behind no metadata allowing determination of what files were >installed)
Is there another way to install my module that pip will recognize?
By the way, I'm using a windows computer. Just wanted to mention that in case there are different solutions for Windows, Linux, and Mac.
Packages can be uninstalled from a virtual environment using pip or pipenv.
Run command prompt as administrator. Give the command easy_install -m pip. This may not uninstall pip completely. So again give this command pip uninstall pip If by previous command pip got uninstalled then this command wont run, else it will completely remove pip.
You're giving pip a Python file and not a package name, so it doesn't know what to do. If you want pip to remove it, try providing the name of the package this setup.py file is actually part of.
There are some good suggestions in this related thread: python setup.py uninstall
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With