Unlike Conda, Pip doesn't seem to track revisions and Conda doesn't actively track what Pip does (it passively detects installed packages in the lib/python*/site-packages
).
One idea around that conundrum might be to export a --from-history
YAML:
conda env export -n base --from-history
That will include a section of pip:
installed packages and you could use that as the list of packages to remove. It could still be problematic if, for example, Pip installed a newer version of a package from PyPI that is essential for the conda
package to function.
If truly broken, you can also restore basic Conda functionality by using a standalone tool like Micromamba. See https://stackoverflow.com/a/75381135/570918, but you'll need to check the docs for Windows installation steps.