Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip says modules "weren't found" to uninstall, but pip list shows them

With pip list I'm shown a listing of the installed modules, which includes scipy, numpy, and pandas.

If I pip install -U... any of those, it checks it, sees its up-to-date, and returns to prompt. But if I pip uninstall pandas or any of the items I can see in the list, it says

Can't uninstall numpy. No files were found to uninstall

I installed everything that has to do with Python through Enthought's Canopy Stack.

like image 415
d8aninja Avatar asked Aug 18 '14 00:08

d8aninja


People also ask

How do I uninstall all pip modules?

If we can list all the packages installed, then we can pass that list to pip uninstall to uninstall all of them: $ pip uninstall -y -r <(pip freeze) # <() is known as process substitution Uninstalling...

How do I uninstall Python pip?

python -m pip uninstall [options] <package> ... python -m pip uninstall [options] -r <requirements file> ... py -m pip uninstall [options] <package> ... py -m pip uninstall [options] -r <requirements file> ...

How do I see all pip installations?

If you want to list all the Python packages installed in an environment, pip list command is what you are looking for. The command will return all the packages installed, along with their specific version and location.

How do I uninstall pip and install again?

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.


1 Answers

Apparently there is some extra care required when installing/package managing with Canopy - for example, devs/staff @ Enthought say (eg https://support.enthought.com/entries/22914233-Using-non-EPD-package-installers-such-as-pip)

"The best practice, when you wish to install an EPD package from another source, is first to uninstall it (enpkg --remove some_package), then to install it using whatever technique you prefer" such as (pip install some_package)

It's worth noting that the 'sklearn' module is letting me import datasets after having used the Canopy Package Manager to update (33) out-of-date packages. NOTE: THESE WERE PACKAGES PIP SAID WERE UP-TO-DATE!

To sum up: if you installed Canopy, use the package manager (IMHO, always, even though there is some work-around listed in the link above) to keep updated and then work from the prompt if you choose. FOR SOME REASON PIP CANNOT SEE (?) THE PACKAGES BEING MANAGED BY CANOPY!!!

like image 172
d8aninja Avatar answered Nov 03 '22 09:11

d8aninja