pipdeptree icon indicating copy to clipboard operation
pipdeptree copied to clipboard

Failed to find some of the dependencies in `pipdeptree -u`

Open xlucn opened this issue 3 years ago • 5 comments

This is part of the output of pipdeptree -u, showing pycryptodome and python-xlib reported to be 'missing':

Warning!!! Possibly conflicting dependencies found:
* pynput==1.6.8
 - python-xlib [required: >=0.17, installed: ?]
* dcnnt==0.3.6
 - pycryptodome [required: >=3.9.3, installed: ?]

However they are installed in the system directory

$ pip show pycryptodome python-xlib
Name: pycryptodome
Version: 3.9.8
Summary: Cryptographic library for Python
Home-page: https://www.pycryptodome.org
Author: Helder Eijs
Author-email: [email protected]
License: BSD, Public Domain, Apache
Location: /usr/lib/python3.8/site-packages
Requires:
Required-by: dcnnt
---
Name: python-xlib
Version: 0.27
Summary: Python X Library
Home-page: https://github.com/python-xlib/python-xlib
Author: Peter Liljenberg
Author-email: [email protected]
License: LGPLv2+
Location: /usr/lib/python3.8/site-packages
Requires: six
Required-by: pynput, ueberzug

Other globally installed packages are detected successfully, e.g. six and urllib3.

Why are these two packages not found when using -u option?

xlucn avatar Jul 12 '20 02:07 xlucn

pipdeptree uses pip itself to figure out the installed packages and the -u flag is also passed down to the pip._internal.utils.misc.get_installed_distributions function. So, if pip is able to find an installed package, pipdeptree should also be able to find it.

Can you please paste the output of pip freeze --user?

You might also want to try the recently released beta version of pipdeptree 2.0.0b1. You can install it with pip install pipdeptree==2.0.0b1. Let me know the versions of python and pip that you're using as well.

naiquevin avatar Jul 12 '20 06:07 naiquevin

Versions of pip and python:

$ pip -V
pip 20.1.1 from /usr/lib/python3.8/site-packages/pip (python 3.8)
$ python -V
Python 3.8.3

I think I should mention that I installed pipdeptree in my user directory with pip install --user.

This is the output of pip freeze --user, quite some of the deps are installed in the system directory thus not in this list:

$ pip freeze --user
attrdict==2.0.1
babelfish==0.5.5
beautifulsoup4==4.9.1
bencoder.pyx==2.0.1
blinker==1.4
blist==1.3.6
certifi==2020.6.20
dcnnt==0.3.6
dogpile.cache==0.9.2
emcee==3.0.2
enzyme==0.4.1
flatbencode==0.2.1
guessit==3.1.1
html2text==2020.1.16
Js2Py==0.70
keyboard==0.13.5
mistune==0.8.4
orderedattrdict==1.6.0
panwid==0.2.5
pbr==5.4.5
pip-autoremove==0.9.1
pipdeptree==1.0.0
psutil==5.7.0
py-mini-racer==0.3.0
PyExecJS==1.5.1
pyjsparser==2.7.1
pynput==1.6.8
pysrt==1.1.2
python-dateutil==2.8.1
pyTwistyScrambler==1.2
pytz==2020.1
qbittorrent-api==2020.6.4
qbittorrentui==0.1.2
raccoon==3.0.0
rarfile==3.1
rebulk==2.0.1
requests==2.24.0
soupsieve==2.0.1
stevedore==3.0.0
subliminal==2.1.0
tabulate==0.8.7
torf==3.0.2
tzlocal==2.1
urwid==2.1.0
urwid-utils==0.1.2
xmltodict==0.12.0

In case it is helpful, this is the output of pipdeptree -u

Expand
Warning!!! Possibly conflicting dependencies found:
* qbittorrentui==0.1.2
 - urwid [required: ==2.0.1, installed: 2.1.0]
* pynput==1.6.8
 - python-xlib [required: >=0.17, installed: ?]
* panwid==0.2.5
 - raccoon [required: ==2.1.5, installed: 3.0.0]
* dcnnt==0.3.6
 - pycryptodome [required: >=3.9.3, installed: ?]
------------------------------------------------------------------------
bencoder.pyx==2.0.1
dcnnt==0.3.6
  - pycryptodome [required: >=3.9.3, installed: ?]
emcee==3.0.2
  - numpy [required: Any, installed: 1.19.0]
html2text==2020.1.16
Js2Py==0.70
  - pyjsparser [required: >=2.5.1, installed: 2.7.1]
  - six [required: >=1.10, installed: 1.15.0]
  - tzlocal [required: >=1.2, installed: 2.1]
    - pytz [required: Any, installed: 2020.1]
keyboard==0.13.5
mistune==0.8.4
pip-autoremove==0.9.1
pipdeptree==1.0.0
  - pip [required: >=6.0.0, installed: 20.1.1]
psutil==5.7.0
py-mini-racer==0.3.0
pynput==1.6.8
  - python-xlib [required: >=0.17, installed: ?]
  - six [required: Any, installed: 1.15.0]
pyTwistyScrambler==1.2
  - appdirs [required: Any, installed: 1.4.4]
  - packaging [required: Any, installed: 20.4]
  - PyExecJS [required: Any, installed: 1.5.1]
    - six [required: >=1.10.0, installed: 1.15.0]
  - pyparsing [required: Any, installed: 2.4.7]
  - six [required: Any, installed: 1.15.0]
qbittorrentui==0.1.2
  - attrdict [required: >=2.0.0,=0.1.2, installed: 0.1.2]
      - urwid [required: Any, installed: 2.1.0]
  - qbittorrent-api [required: Any, installed: 2020.6.4]
    - attrdict [required: >=2.0.0, installed: 2.0.1]
      - six [required: Any, installed: 1.15.0]
    - requests [required: >=2.16.0, installed: 2.24.0]
      - certifi [required: >=2017.4.17, installed: 2020.6.20]
      - chardet [required: >=3.0.2,=2.5,=1.21.1,=1.24.2, installed: 1.25.9]
  - urwid [required: ==2.0.1, installed: 2.1.0]
subliminal==2.1.0
  - appdirs [required: >=1.3, installed: 1.4.4]
  - babelfish [required: >=0.5.2, installed: 0.5.5]
  - beautifulsoup4 [required: >=4.4.0, installed: 4.9.1]
    - soupsieve [required: >1.2, installed: 2.0.1]
  - chardet [required: >=2.3.0, installed: 3.0.4]
  - click [required: >=4.0, installed: 7.1.2]
  - dogpile.cache [required: >=0.6.0, installed: 0.9.2]
    - decorator [required: >=4.0.0, installed: 4.4.2]
  - enzyme [required: >=0.4.1, installed: 0.4.1]
  - guessit [required: >=3.0.0, installed: 3.1.1]
    - babelfish [required: Any, installed: 0.5.5]
    - python-dateutil [required: Any, installed: 2.8.1]
      - six [required: >=1.5, installed: 1.15.0]
    - rebulk [required: ==2.*, installed: 2.0.1]
      - six [required: Any, installed: 1.15.0]
    - six [required: Any, installed: 1.15.0]
  - pysrt [required: >=1.0.1, installed: 1.1.2]
    - chardet [required: Any, installed: 3.0.4]
  - pytz [required: >=2012c, installed: 2020.1]
  - rarfile [required: >=2.7, installed: 3.1]
  - requests [required: >=2.0, installed: 2.24.0]
    - certifi [required: >=2017.4.17, installed: 2020.6.20]
    - chardet [required: >=3.0.2,=2.5,=1.21.1,=1.9.0, installed: 1.15.0]
  - stevedore [required: >=1.20.0, installed: 3.0.0]
    - pbr [required: >=2.0.0,!=2.1.0, installed: 5.4.5]
torf==3.0.2
  - flatbencode [required: ==0.2.*, installed: 0.2.1]
xmltodict==0.12.0

I just tried the beta version 2.0.0b1, it directly exited with an error, probably another issue:

$ pipdeptree -u
Warning!!! Possibly conflicting dependencies found:
* dcnnt==0.3.6
 - pycryptodome [required: >=3.9.3, installed: ?]
* panwid==0.2.5
 - raccoon [required: ==2.1.5, installed: 3.0.0]
* pynput==1.6.8
 - python-xlib [required: >=0.17, installed: ?]
* qbittorrentui==0.1.2
 - urwid [required: ==2.0.1, installed: 2.1.0]
------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/oliver/.local/bin/pipdeptree", line 8, in <module>
    sys.exit(main())
  File "/home/oliver/.local/lib/python3.8/site-packages/pipdeptree.py", line 799,
n main
    cycles = cyclic_deps(tree)
  File "/home/oliver/.local/lib/python3.8/site-packages/pipdeptree.py", line 685,
n cyclic_deps
    if p.key in index[r.key]:
KeyError: 'six'

xlucn avatar Jul 12 '20 06:07 xlucn

Ok. I am running a machine with Python 2.7 installed as the default version. I'll need to try installing your packages on a machine with python 3.8 as the default to be able to test with the -u flag.

As for error in case of pipdeptree 2.0.0b1, it's the same error that was fixed in PR #125. So you may try using the latest master instead of the version from PyPI.

However, I don't think the problem is related to the pipdeptree version. Will investigate this further.

naiquevin avatar Jul 12 '20 07:07 naiquevin

Also seems to be duplicate of issue #112

naiquevin avatar Jul 12 '20 08:07 naiquevin

As for error in case of pipdeptree 2.0.0b1, it's the same error that was fixed in PR #125. So you may try using the latest master instead of the version from PyPI.

However, I don't think the problem is related to the pipdeptree version. Will investigate this further.

Yes, I tried the latest master version, it runs with no errors but with the same issue here.

xlucn avatar Jul 12 '20 08:07 xlucn

Closing as duplicate.

gaborbernat avatar Sep 06 '22 07:09 gaborbernat