musco-ai / musco-pytorch

MUSCO: MUlti-Stage COmpression of neural networks
BSD 3-Clause "New" or "Revised" License
71 stars 16 forks source link

Installation fails due to conflicting numpy version #4

Open NeolithEra opened 4 years ago

NeolithEra commented 4 years ago

Hi, users are unable to run musco-pytorch due to dependency conflict with numpy package. As shown in the following full dependency graph of musco-pytorch, musco-pytorch requires numpy *,while scikit-tensor-py3 requires numpy ==1.16.*.

According to pip’s “first found wins” installation strategy, numpy 1.17.4 is the actually installed version. However, numpy 1.17.4 does not satisfy *_==1.16._**.

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

musco-pytorch - 1.0.3
| +- absl-py(install version:0.8.1 version range:*)
| +- flopco-pytorch(install version:0.1.3 version range:*)
| +- numpy(install version:1.17.4 version range:*)
| +- scikit-tensor-py3(install version:0.4.1 version range:*)
| | +- numpy(install version:1.16.5 version range:==1.16.*)
| | +- scipy(install version:1.3.3 version range:==1.3.)
| +- scipy(install version:1.3.3 version range:*)
| +- tensorly-musco(install version:0.4.5 version range:*)

Thanks for your help. Best, Neolith

NeolithEra commented 4 years ago

Suggested Solution

  1. Fix your direct dependency to be numpy <1.17.0. I have checked this revision will not affect your downstream projects now.
  2. Ask your upstream project scikit-tensor-py3 to loose the version range of numpy.
  3. Remove your direct dependency numpy, and use numpy transitively introduced by scikit-tensor-py3.

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