I want to know how to uninstall a package from the slicer’s python, since I have tried many ways but not work.
/path/to/Slicer -m pip uninistall
You can also use
slicer.util.pip_uninstall() function. You may need to restart Slicer after this if the package was loaded when you tried to uninstall it.
There was a typo - it should be