tensorflow/models

pip is looking for multiple version of <library> to determine which version is compatible with other requirements.

alfanme opened this issue · 14 comments

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am using the latest TensorFlow Model Garden release and TensorFlow 2.
  • I am reporting the issue to the correct repository. (Model Garden official or research directory)
  • I checked to make sure that this issue has not already been filed.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/tree/master/research/object_detection/packages/tf2/setup.py

2. Describe the bug

I'm using Google Colab. When installing object detection dependencies, the cell output shows that pip installing multiple versions of some libraries such as scipy, six, etc. I was leaving it to finish, but it has already taken hours, the execution still running and can't finish the installation.

3. Steps to reproduce

To reproduce, it's simply by cloning this repo:

!git clone https://github.com/tensorflow/models.git

Then, execute the command to install dependencies using setup.py

%cd models/research
# Compile protos.
!protoc object_detection/protos/*.proto --python_out=.
# Install TensorFlow Object Detection API.
!cp object_detection/packages/tf2/setup.py .
!python -m pip install --use-feature=2020-resolver .

4. Expected behavior

The expected behavior is the installation process finishes and doesn't take a long time.

5. Additional context

Here's the log output from the execution process:

INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Downloading scipy-1.4.1-cp37-cp37m-manylinux1_x86_64.whl (26.1 MB)
     |████████████████████████████████| 26.1 MB 55 kB/s 
  Downloading scipy-1.4.0-cp37-cp37m-manylinux1_x86_64.whl (26.1 MB)
     |████████████████████████████████| 26.1 MB 1.6 MB/s 
  Downloading scipy-1.3.3-cp37-cp37m-manylinux1_x86_64.whl (25.2 MB)
     |████████████████████████████████| 25.2 MB 23 kB/s 
  Downloading scipy-1.3.2-cp37-cp37m-manylinux1_x86_64.whl (25.2 MB)
     |████████████████████████████████| 25.2 MB 63.6 MB/s 
  Downloading scipy-1.3.1-cp37-cp37m-manylinux1_x86_64.whl (25.2 MB)
     |████████████████████████████████| 25.2 MB 1.6 MB/s 
  Downloading scipy-1.3.0-cp37-cp37m-manylinux1_x86_64.whl (25.2 MB)
     |████████████████████████████████| 25.2 MB 1.8 MB/s 
  Downloading scipy-1.2.3-cp37-cp37m-manylinux1_x86_64.whl (24.8 MB)
     |████████████████████████████████| 24.8 MB 49 kB/s 
  Downloading scipy-1.2.2-cp37-cp37m-manylinux1_x86_64.whl (24.8 MB)
     |████████████████████████████████| 24.8 MB 2.0 MB/s 
  Downloading scipy-1.2.1-cp37-cp37m-manylinux1_x86_64.whl (24.8 MB)
     |████████████████████████████████| 24.8 MB 1.8 MB/s 
  Downloading scipy-1.2.0-cp37-cp37m-manylinux1_x86_64.whl (26.6 MB)
     |████████████████████████████████| 26.6 MB 76 kB/s 
  Downloading scipy-1.1.0-cp37-cp37m-manylinux1_x86_64.whl (31.2 MB)
     |████████████████████████████████| 31.2 MB 120 kB/s 
  Downloading scipy-1.0.1.tar.gz (15.5 MB)
     |████████████████████████████████| 15.5 MB 70 kB/s 
  Downloading scipy-1.0.0.tar.gz (15.2 MB)
     |████████████████████████████████| 15.2 MB 46 kB/s 
  Downloading scipy-0.19.1.tar.gz (14.1 MB)
     |████████████████████████████████| 14.1 MB 22.6 MB/s 
INFO: pip is looking at multiple versions of rsa to determine which version is compatible with other requirements. This could take a while.
Collecting rsa<5,>=3.1.4
  Downloading rsa-4.7.2-py3-none-any.whl (34 kB)
  Downloading rsa-4.7.1-py3-none-any.whl (36 kB)
  Downloading rsa-4.7-py3-none-any.whl (34 kB)
  Downloading rsa-4.6-py3-none-any.whl (47 kB)
     |████████████████████████████████| 47 kB 3.6 MB/s 
  Downloading rsa-4.5-py2.py3-none-any.whl (36 kB)
  Downloading rsa-4.4.1-py2.py3-none-any.whl (33 kB)
  Downloading rsa-4.3-py2.py3-none-any.whl (36 kB)
INFO: pip is looking at multiple versions of rsa to determine which version is compatible with other requirements. This could take a while.
  Downloading rsa-4.2.tar.gz (46 kB)
     |████████████████████████████████| 46 kB 3.5 MB/s 
  Downloading rsa-4.1-py3-none-any.whl (32 kB)
  Downloading rsa-4.0-py2.py3-none-any.whl (38 kB)
  Downloading rsa-3.4.2-py2.py3-none-any.whl (46 kB)
     |████████████████████████████████| 46 kB 3.5 MB/s 
  Downloading rsa-3.4.1-py2.py3-none-any.whl (46 kB)
     |████████████████████████████████| 46 kB 3.2 MB/s 
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Downloading rsa-3.4-py2.py3-none-any.whl (46 kB)
     |████████████████████████████████| 46 kB 3.4 MB/s 
  Downloading rsa-3.3-py2.py3-none-any.whl (44 kB)
     |████████████████████████████████| 44 kB 2.1 MB/s 
  Downloading rsa-3.2.3-py2.py3-none-any.whl (44 kB)
     |████████████████████████████████| 44 kB 2.3 MB/s 
  Downloading rsa-3.2.2-py2.py3-none-any.whl (44 kB)
     |████████████████████████████████| 44 kB 1.7 MB/s 
  Downloading rsa-3.2-py2.py3-none-any.whl (43 kB)
     |████████████████████████████████| 43 kB 1.7 MB/s 
  Downloading rsa-3.1.4.tar.gz (36 kB)
INFO: pip is looking at multiple versions of idna to determine which version is compatible with other requirements. This could take a while.
Collecting idna<3,>=2.5
  Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 5.9 MB/s 
  Downloading idna-2.9-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 4.9 MB/s 
  Downloading idna-2.8-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 5.5 MB/s 
  Downloading idna-2.7-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 5.1 MB/s 
  Downloading idna-2.6-py2.py3-none-any.whl (56 kB)
     |████████████████████████████████| 56 kB 4.0 MB/s 
  Downloading idna-2.5-py2.py3-none-any.whl (55 kB)
     |████████████████████████████████| 55 kB 3.1 MB/s 
INFO: pip is looking at multiple versions of chardet to determine which version is compatible with other requirements. This could take a while.
Collecting chardet<4,>=3.0.2
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
     |████████████████████████████████| 133 kB 55.2 MB/s 
INFO: pip is looking at multiple versions of idna to determine which version is compatible with other requirements. This could take a while.
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Downloading chardet-3.0.3-py2.py3-none-any.whl (133 kB)
     |████████████████████████████████| 133 kB 42.4 MB/s 

6. System information

  • OS Platform and Distribution: Ubuntu 18.04.5 LTS
  • TensorFlow version (use command below): v2.7.0-0-gc256c071bb2 2.7.0
  • Python version: Python 3.7.12
  • CUDA/cuDNN version: 11.2/8.1.0
  • GPU model and memory: P100 16GB

having the same problem

I am facing the same issue on my Kaggle Notebook, which worked well a few days ago.

Link to the Notebook

Me too facing the same issue in my Google COLAB Notebook. Please fix the issue. Already, training the model is taking high duration of time. Now, the installation of pip packages taking longer than training the model.

!pip install --upgrade pip
Changed pip version from 21.1.3 to 21.3.1 and that resolved this problem for me.
I was able to run the following command successfully, when before it did not finish even after several hours:

%%bash
cd models/research/
protoc object_detection/protos/*.proto --python_out=.
cp object_detection/packages/tf2/setup.py .
python -m pip install .

If after that you will face an issue with cuDNN initialization, look at this thread for a solution:
#10360 (comment)

having the same problem

having the same problem

@alfanme please check #34834 (comment) and let us know if your issue got resolved or not?

Had the same problem. Was stuck for two weeks. I updated the pip first and it seems to work.

I also had same problem on Google Colab. Upgrade of pip seems to fix the issue.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

Closing as stale. Please reopen if you'd like to work on this further.

Are you satisfied with the resolution of your issue?
Yes
No

Try using the old resolver, that worked for me while upgrading pip didn't.

pip install ... --use-deprecated legacy-resolver