pip.get_installed_distributions() doesn't check if a package has been uninstalled (or added)
See original GitHub issueIt seems there is no way to ask pip to re-check if his modules are still present.
Let suppose I have a module astroid
.
# in Python console1
import pip
pip.get_installed_distributions() # will show `astroid`module
then open another Python console2
# in Python console2
pip uninstall astroid
Python console1 will continue to claim astroid
module is there is I redo a
# in Python console1 (that is not closed)
pip.get_installed_distributions() # will shows wrongfully `astroid`module
==> Would it be possible to have an option that will force a refresh ?
Issue Analytics
- State:
- Created 8 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Why do I get this when using pip WARNING: Ignoring invalid ...
It got fixed by going to site-packages and deleting the folders starting with ~. >pip install pyspark WARNING: Ignoring invalid distribution ...
Read more >Using Python's pip to Manage Your Projects' Dependencies
Install and uninstall packages with pip; Manage projects' dependencies using requirements files. You can do a lot with pip , but the Python ......
Read more >Installing scikit-image — skimage v0.19.2 docs
To see whether scikit-image is already installed or to check if an install has worked, run the following in a Python shell or...
Read more >Notebook-scoped Python libraries | Databricks on AWS
Notebook-scoped libraries do not persist across sessions. ... You can use %pip to install a private package that has been saved on DBFS....
Read more >Python Package Installation on Windows - ActiveState
Click to learn why the Pip Package Manager is the de facto standard for managing Python distributions, and is recommended for installing ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So, for a workaround, you can do this:
Yah - thats one of the reasons reload is rarely the right thing 😃