itholic commented on PR #44745:
URL: https://github.com/apache/spark/pull/44745#issuecomment-1894850179
It seems like if there are extension packages that use parts of the package
we're trying to remove, `pip uninstall` adds those dependencies to the `Would
not remove` list and doesn't actually remove them.
In our case, `pip uninstall` prints out `Would not remove` list and doesn't
actually remove them when `pandas-stubs` is still installed, and that's why
`pandas` is not completely removed:
```
(pyspark-dev-env) haejoon.lee@NQ679Q495F spark % pip uninstall pandas
Found existing installation: pandas 2.1.4
Uninstalling pandas-2.1.4:
Would remove:
/Users/haejoon.lee/anaconda3/envs/pyspark-dev-env/lib/python3.9/site-packages/pandas-2.1.4.dist-info/*
/Users/haejoon.lee/anaconda3/envs/pyspark-dev-env/lib/python3.9/site-packages/pandas/*
Would not remove (might be manually added):
/Users/haejoon.lee/anaconda3/envs/pyspark-dev-env/lib/python3.9/site-packages/pandas/__init__.pyi
/Users/haejoon.lee/anaconda3/envs/pyspark-dev-env/lib/python3.9/site-packages/pandas/_config/__init__.pyi
/Users/haejoon.lee/anaconda3/envs/pyspark-dev-env/lib/python3.9/site-packages/pandas/_config/config.pyi
...
/Users/haejoon.lee/anaconda3/envs/pyspark-dev-env/lib/python3.9/site-packages/pandas/util/_tester.pyi
/Users/haejoon.lee/anaconda3/envs/pyspark-dev-env/lib/python3.9/site-packages/pandas/util/_validators.pyi
/Users/haejoon.lee/anaconda3/envs/pyspark-dev-env/lib/python3.9/site-packages/pandas/util/testing.pyi
```
So, to completely remove `pandas`, we need to uninstall `pandas-stubs` first
and then uninstall `pandas`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]