Jimbwlah / tensorflow-ring-animal-detector

52 stars 9 forks source link

Cannot install requirements #2

Open averter opened 6 months ago

averter commented 6 months ago

Hi, I've tried to install the requirements using the latest python version but there are conflicts between packages (relevant output below). I've then tried to use different python versions: 3.7.2, 3.8.2 and 3.9.2 but none seems to work. Do you have any suggestions? What version of python have you used? Thanks in advance.

NFO: pip is looking at multiple versions of sacrebleu to determine which version is compatible with other requirements. This could take a while.
Collecting sacrebleu<=2.2.0
  Using cached sacrebleu-2.1.0-py3-none-any.whl (92 kB)
INFO: pip is looking at multiple versions of keyboard to determine which version is compatible with other requirements. This could take a while.
Collecting keyboard
  Using cached https://www.piwheels.org/simple/keyboard/keyboard-0.13.4-py2.py3-none-any.whl (58 kB)
INFO: pip is looking at multiple versions of paho-mqtt to determine which version is compatible with other requirements. This could take a while.
Collecting paho-mqtt
  Using cached https://www.piwheels.org/simple/paho-mqtt/paho_mqtt-1.6.1-py3-none-any.whl (75 kB)
INFO: pip is looking at multiple versions of pyparsing to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of object-detection 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 pyyaml to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r requirements.txt (line 2), object-detection and pyyaml==5.3 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested pyyaml==5.3
    tf-models-official 2.16.0 depends on pyyaml>=6.0.0
    The user requested pyyaml==5.3
    tf-models-official 2.15.0 depends on pyyaml>=6.0.0
    The user requested pyyaml==5.3
    tf-models-official 2.14.2 depends on pyyaml>=6.0.0
    The user requested pyyaml==5.3
    tf-models-official 2.14.1 depends on pyyaml>=6.0.0
    The user requested pyyaml==5.3
    tf-models-official 2.14.0 depends on pyyaml>=6.0.0
    The user requested pyyaml==5.3
    tf-models-official 2.13.2 depends on pyyaml>=6.0.0
    tf-models-official 2.13.1 depends on tensorflow-text~=2.13.0
    tf-models-official 2.13.0 depends on tensorflow-text~=2.13.0
    tf-models-official 2.12.1 depends on tensorflow-addons
    tf-models-official 2.12.0 depends on tensorflow-addons
    tf-models-official 2.11.6 depends on tensorflow-addons
    tf-models-official 2.11.5 depends on tensorflow-addons
    tf-models-official 2.11.4 depends on tensorflow-addons
    tf-models-official 2.11.3 depends on tensorflow-addons
    tf-models-official 2.11.2 depends on tensorflow-addons
    tf-models-official 2.11.0 depends on opencv-python-headless==4.5.2.52
    object-detection 0.1 depends on sacrebleu<=2.2.0
    tf-models-official 2.10.1 depends on sacrebleu==2.2.0
    tf-models-official 2.10.0 depends on opencv-python-headless==4.5.2.52
    tf-models-official 2.9.2 depends on tensorflow-addons
    tf-models-official 2.9.1 depends on tensorflow-addons
    tf-models-official 2.9.0 depends on tensorflow-addons
    tf-models-official 2.8.0 depends on tensorflow-addons

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/topics/dependency-resolution/#dealing-with-dependency-conflicts
Jimbwlah commented 6 months ago

Hi, sorry to hear you've had issues. I started making some installation changes last night and found this issue too.

Can you see if the following works, try

python -m pip install pyyaml==5.3.1     
averter commented 6 months ago

Thanks very much for your reply! If I install pyyaml 5.3.1 and comment it out from the requirements.txt file there are less errors indeed, although tf-models and TFaddons still seem to conflict with each other (output below)...

INFO: pip is looking at multiple versions of sacrebleu to determine which version is compatible with other requirements. This could take a while.
Collecting sacrebleu<=2.2.0
  Using cached sacrebleu-2.1.0-py3-none-any.whl (92 kB)
INFO: pip is looking at multiple versions of keyboard to determine which version is compatible with other requirements. This could take a while.
Collecting keyboard
  Using cached https://www.piwheels.org/simple/keyboard/keyboard-0.13.4-py2.py3-none-any.whl (58 kB)
INFO: pip is looking at multiple versions of paho-mqtt to determine which version is compatible with other requirements. This could take a while.
Collecting paho-mqtt
  Using cached https://www.piwheels.org/simple/paho-mqtt/paho_mqtt-1.6.1-py3-none-any.whl (75 kB)
INFO: pip is looking at multiple versions of pyparsing 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 object-detection to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install -r requirements.txt (line 1) and object-detection because these package versions have conflicting dependencies.

The conflict is caused by:
    tf-models-official 2.16.0 depends on tensorflow-text~=2.16.1
    tf-models-official 2.15.0 depends on tensorflow-text~=2.15.0
    tf-models-official 2.14.2 depends on tensorflow-text~=2.14.0
    tf-models-official 2.14.1 depends on tensorflow-text~=2.14.0
    tf-models-official 2.14.0 depends on tensorflow-text~=2.14.0
    tf-models-official 2.13.2 depends on tensorflow-text~=2.13.0
    tf-models-official 2.13.1 depends on tensorflow-text~=2.13.0
    tf-models-official 2.13.0 depends on tensorflow-text~=2.13.0
    tf-models-official 2.12.1 depends on tensorflow-addons
    tf-models-official 2.12.0 depends on tensorflow-addons
    tf-models-official 2.11.6 depends on tensorflow-addons
    tf-models-official 2.11.5 depends on tensorflow-addons
    tf-models-official 2.11.4 depends on tensorflow-addons
    tf-models-official 2.11.3 depends on tensorflow-addons
    tf-models-official 2.11.2 depends on tensorflow-addons
    tf-models-official 2.11.0 depends on opencv-python-headless==4.5.2.52
    object-detection 0.1 depends on sacrebleu<=2.2.0
    tf-models-official 2.10.1 depends on sacrebleu==2.2.0
    tf-models-official 2.10.0 depends on opencv-python-headless==4.5.2.52
    tf-models-official 2.9.2 depends on tensorflow-addons
    tf-models-official 2.9.1 depends on tensorflow-addons
    tf-models-official 2.9.0 depends on tensorflow-addons
    tf-models-official 2.8.0 depends on tensorflow-addons

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/topics/dependency-resolution/#dealing-with-dependency-conflicts