Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python, anaconda, Spyder -- uninstalling python package using pip DOES NOT work in Spyder + ipython

By using pip, I can successfully install new packages in ipython running in the Spyder environment. All I need to run is this:

!python -m pip install mypackage

However, trying to uninstall packages doesn't seem to work, at all. When I run:

!python -m pip uninstall mypackage

The console goes into a state of hanging. It's not strictly 'hanging' because neither Spyder nor the console hangs but the command just isn't returning anything

I am attaching a screenshot to help explain what I mean. The screenshot shows what happens AFTER I have pressed ENTER on this line - and nothing happens!

Does anything know why?

pip uninstall.jpg

like image 301
ZXY Avatar asked Feb 03 '26 23:02

ZXY


1 Answers

You should not use pip with Spyder. It can break your whole distribution. Spyder is part of the Anaconda package and you should use the conda command instead of pip. The conda command works similar to the pip command. Instead of pip install package you'd use conda install package.

like image 130
Natsfan Avatar answered Feb 06 '26 11:02

Natsfan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!