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.
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...
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> ...
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.
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.
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!!!
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