speechmetrics icon indicating copy to clipboard operation
speechmetrics copied to clipboard

Can't install this package according to the steps in the readme

Open KnurpsBram opened this issue 4 years ago • 6 comments

When I follow the steps in the readme I am unable to install this package.

conda create --name myenv python=3.7
pip install numpy
pip install git+https://github.com/aliutkus/speechmetrics#egg=speechmetrics[cpu]

The error I get is as follows:

Collecting speechmetrics[cpu]
  Cloning https://github.com/aliutkus/speechmetrics to /tmp/pip-install-niosg_5m/speechmetrics_e8b8c8981b054e5abf0eb066869fb2be
Requirement already satisfied: numpy in /home/bram/miniconda3/envs/myenv/lib/python3.6/site-packages (from speechmetrics[cpu]) (1.19.5)
Collecting gammatone@ git+https://github.com/detly/gammatone
  Cloning https://github.com/detly/gammatone to /tmp/pip-install-niosg_5m/gammatone_895b5433ba3942b89e09332d77220272
Collecting pypesq@ git+https://github.com/vBaiCai/python-pesq
  Cloning https://github.com/vBaiCai/python-pesq to /tmp/pip-install-niosg_5m/pypesq_10d103a6483e4b49baf71e1a6c5e1860
Collecting srmrpy@ git+https://github.com/jfsantos/SRMRpy
  Cloning https://github.com/jfsantos/SRMRpy to /tmp/pip-install-niosg_5m/srmrpy_bdd74c3ba26f435a9e50257e2b5ae2ee
Collecting Gammatone@ https://github.com/detly/gammatone/archive/master.zip#egg=Gammatone
  Using cached https://github.com/detly/gammatone/archive/master.zip
INFO: pip is looking at multiple versions of speechmetrics to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pypesq to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of gammatone to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of speechmetrics[cpu] to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install speechmetrics, speechmetrics==1.0 and speechmetrics[cpu]==1.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    speechmetrics[cpu] 1.0 depends on gammatone 1.0 (from git+https://github.com/detly/gammatone)
    speechmetrics 1.0 depends on gammatone 1.0 (from git+https://github.com/detly/gammatone)
    srmrpy 1.0 depends on gammatone 1.0 (from https://github.com/detly/gammatone/archive/master.zip#egg=Gammatone)

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

Where are the versions specified and can they be updated to make the install commands work? Any other tips are welcome as well.

KnurpsBram avatar Jan 11 '21 07:01 KnurpsBram

hi, do you have the latest pip installed ?

aliutkus avatar Jan 11 '21 07:01 aliutkus

yes, the pip version is 20.3.3

KnurpsBram avatar Jan 11 '21 08:01 KnurpsBram

I have made a temporary workaround by forking the SRMRpy repo and changing the requirements of gammatone there https://github.com/KnurpsBram/SRMRpy. I have also forked this repo so that I can adjust setup.py to refer to the SRMRpy fork. https://github.com/KnurpsBram/speechmetrics

KnurpsBram avatar Jan 11 '21 08:01 KnurpsBram

ok. If you manage to fix that by touching only speechmetrics, feel free to do a PR thanks

aliutkus avatar Jan 11 '21 08:01 aliutkus

I have used KnurpsBram's solution successfully when updating to Python 3.7. It might be not clear for beginners what does it entail, but basically the installation should be come:

pip install numpy pip install git+https://github.com/KnurpsBram/SRMRpy pip install git+https://github.com/KnurpsBram/speechmetrics

The problem is about the Gammatone dependency, where the SRMRPy and/or speechmetrics seem to be too conservative about which dependency is required.

Previously, I didn't have a problem within 3.6.9, so it might be a version-specific dependency problem.

karkirowle avatar Jan 27 '21 13:01 karkirowle

Thanks a lot for this!!! Feel free to do a PR on the readme to get crédit for it, or I can do it

aliutkus avatar Jan 27 '21 13:01 aliutkus