dvolgyes/TMO4CT

Conflicts between TMO4CT and tifffile

Closed this issue · 2 comments

Hi, users are unable to run TMO4CT due to dependency conflict with tifffile package. As shown in the following full dependency graph of TMO4CT, TMO4CT requires tifffile*,while dcm2hdr requires tifffile<1.0pydicom>=1.0,<2.0,>=0.14.0.

According to pip’s “first found wins” installation strategy, tifffile 2019.7.26.2 is the actually installed version. However, tifffile 2019.7.26.2 does not satisfy <1.0pydicom>=1.0,<2.0,>=0.14.0.

Dependency tree-----------

TMO4CT - 0.6
| +- dcm2hdr(install version:1.1.0 version range:*)
| | +- tifffile<1.0pydicom>=1.0,<2.0,>=0.14.0
| +- imageio(install version:2.6.1 version range:*)
| | +- numpy(install version:1.18.0rc1 version range:*)
| | +- pillow(install version:6.2.1 version range:*)
| | | +- black(install version:19.10b0 version range:*)
| | | | +- appdirs(install version:1.4.3 version range:*)
| | | | +- attrs(install version:19.3.0 version range:>=18.1.0)
| | | | +- click(install version:7.0 version range:>=6.5)
| | | | +- pathspec(install version:0.6.0 version range:<1,>=0.6)
| | | | +- regex(install version:2019.12.20 version range:*)
| | | | +- toml(install version:0.10.0 version range:>=0.9.4)
| | | | +- typed-ast(install version:1.4.0 version range:>=1.4.0)
| | | +- check-manifest(install version:0.40 version range:*)
| | | | +- toml(install version:0.10.0 version range:*)
| | | +- coverage(install version:5.0 version range:*)
| | | +- coveralls(install version:1.9.2 version range:*)
| | | +- jarn.viewdoc(install version:2.3 version range:*)
| | | +- olefile(install version:0.46 version range:*)
| | | +- pycodestyle(install version:2.5.0 version range:*)
| | | +- pyflakes(install version:2.1.1 version range:*)
| | | +- pyroma(install version:2.6 version range:*)
| | | | +- docutils(install version:0.16rc1 version range:*)
| | | | +- pygments(install version:2.5.2 version range:*)
| | | | +- setuptools(install version:42.0.2 version range:*)
| | | +- pytest(install version:5.3.2 version range:*)
| | | +- pytest-cov(install version:2.8.1 version range:*)
| | | | +- coverage(install version:5.0 version range:>=4.4)
| | | | +- pytest(install version:5.3.2 version range:>=3.6)
| | | +- sphinx-rtd-theme(install version:0.4.3 version range:*)
| | | | +- sphinx(install version:2.3.0 version range:*)
| +- numpy(install version:1.18.0rc1 version range:*)
| +- pycontracts(install version:1.8.12 version range:*)
| | +- decorator(install version:4.4.1 version range:*)
| | +- future(install version:0.18.2 version range:*)
| | +- pyparsing(install version:2.4.5 version range:*)
| | +- six(install version:1.13.0 version range:*)
| +- python-magic(install version:0.4.15 version range:*)
| +- scikit-image(install version:0.16.2 version range:*)
| +- scipy(install version:1.4.1 version range:*)
| +- tifffile(install version:2019.7.26.2 version range:*)

Thanks for your help.
Best,
Neolith

Suggested Solution

Ask your upstream project dcm2hdr to fix his dependency tifffile<1.0pydicom>=1.0,<2.0,>=0.14.0 to be tifffile<1.0, >=0.14.0 and pydicom>=1.0,<2.0 . I think this may be what he wanted. And then my suggested solutions as follows:

  1. Fix your direct dependency to be tifffile<1.0, >=0.14.0. I have checked this revision will not affect your downstream projects now.
  2. Ask your upstream project dcm2hdr to loose the version range of tifffile.
  3. Remove your direct dependency tifffile, and use tifffile transitively introduced by dcm2hdr.

@dvolgyes Which solution do you prefer, 1, 2 or 3?
Please let me know your choice. I can submit a PR to solve this issue.

It should be fine now.
I made a few other changes, e.g. requiring python3.6+, because python2 will lose support
from 1st January. If you need python2, you can fork/patch the codes.
New package has been uploaded to pypi, so (not counting caching), it should be fine now.
(You might need upgrade first:
pip install -U dcm2hdr
pip install tmo4ct
)