开发者

Find where dependencies are coming from in Python?

开发者 https://www.devze.com 2023-04-05 09:57 出处:网络
When I run pip install . I get all dependencies installed, including transitive dependencies, but the problem is that there are开发者_StackOverflow中文版 two modules that depend on two different versi

When I run pip install . I get all dependencies installed, including transitive dependencies, but the problem is that there are开发者_StackOverflow中文版 two modules that depend on two different versions of lxml. How can I figure out who is requiring what with pip or any other tool?


Do you have an idea of which modules depend on lxml? If so, you could simply check those modules setup.py files and check install_requires, and most package creators will include the version number as well. e.g.

  install_requires=[
    'django-modeldict>=1.1.6',
    'nexus>=0.1.7',
    'django-jsonfield',
  ],

From: https://github.com/disqus/gargoyle/blob/master/setup.py

You may also want to look into something like modulefinder but I think simply checking the setup.py is much easier in this case.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号