30👍
Nowadays python -m pip check
should do the trick.
Seems to have been added as early as pip 9.0.0 released on 2016-11-02.
5👍
It’s not part of pip, but there is a tool you can use called pip-conflict-checker. Just install it through pip and run pipconflictchecker
to get a dump of all the conflicts. pipdeptree could also help here.
You might also be interested in reading this article about dealing with pip dependency issues. The article also discusses the two tools I mentioned above along with strategies to fix broken dependencies.
- Python-social-auth not getting correct Google OAuth2 details
- Could not import settings 'myproject.settings' (Is it on sys.path?): No module named pinax
- Django query filter by number of ManyToMany objects
3👍
In recent pip versions using pip install -r requirements.txt
will fail if you have any conflict in your dependencies specified in requirements.txt
.
- Avoid recursive save() when using celery to update Django model fields
- How to make a customizable user survey in Django
- Django email
- Serializer validate function is not called DRF
1👍
Personally I find that PIPDEPTREE available from PyPi works wonderfully.
Install it via pip install pipdeptree
then run it directly from the command line. Currently it supports Python 3.8, 3.9, 3.10, 3.11, and 3.12
Depending on how big your current environment is, it may take awhile to parse through all of the installed packages, but the output (which defaults to the console) will be worth the wait.
The only issue I ever had was when I first ran it the console buffer was pretty small and I couldn’t scroll back to the beginning of the output. That was corrected by simply increasing the console buffer size then running the program again.
Side Note: It does not care how the Python packages were installed (ie. Conda and/or Pip). It will parse through them all and let you know where problems may be lurking.
This simple Python app has made troubleshooting dependency issues SIGNIFICANTLY easier for me.
Here’s the link to the project on PyPi:
https://pypi.org/project/pipdeptree/
- GenericForeignKey and Admin in Django
- Django settings Unknown parameters: TEMPLATE_DEBUG
- Django – multiple pluralization in admin model
- Specifying Readonly access for Django.db connection object
- Hierarchical Data Models: Adjacency List vs. Nested Sets