问题
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.
回答1:
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!!!
来源:https://stackoverflow.com/questions/25354904/pip-says-modules-werent-found-to-uninstall-but-pip-list-shows-them