Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip3 install failed at README demos/person_vehicle_bike_detection/python #2623

Open
hilliao opened this issue Aug 9, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@hilliao
Copy link

hilliao commented Aug 9, 2024

Describe the bug
pip3 install failed following setup instructions.

To Reproduce
Steps to reproduce the behavior:
follow the setup instructions. All steps were OK until pip3 install -r requirements.txt

Expected behavior
pip3 install succeeds

Logs
before pip3 install, a python virtual environment was created

(python) hil@i5-11400:~/Public/model_server/demos/person_vehicle_bike_detection/python$ pip3 install -r requirements.txt
python person_vehicle_bike_detection.py --help
Collecting futures==3.1.1 (from -r ../../common/python/requirements.txt (line 1))
  Downloading futures-3.1.1-py3-none-any.whl.metadata (674 bytes)
Collecting opencv-python>=4.6.0 (from -r ../../common/python/requirements.txt (line 2))
  Downloading opencv_python-4.10.0.84-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (20 kB)
Collecting tensorflow-serving-api==2.11.0 (from -r ../../common/python/requirements.txt (line 3))
  Downloading tensorflow_serving_api-2.11.0-py2.py3-none-any.whl.metadata (1.8 kB)
Collecting numpy<2.0.0 (from -r ../../common/python/requirements.txt (line 4))
  Downloading numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.0/61.0 kB 3.3 MB/s eta 0:00:00
Collecting grpcio<2.0,>=1.24.3 (from tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading grpcio-1.65.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.3 kB)
Collecting protobuf<3.20,>=3.9.2 (from tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading protobuf-3.19.6-py2.py3-none-any.whl.metadata (828 bytes)
Collecting tensorflow<3,>=2.11.0 (from tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading tensorflow-2.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.2 kB)
Collecting absl-py>=1.0.0 (from tensorflow<3,>=2.11.0->tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading absl_py-2.1.0-py3-none-any.whl.metadata (2.3 kB)
Collecting astunparse>=1.6.0 (from tensorflow<3,>=2.11.0->tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading astunparse-1.6.3-py2.py3-none-any.whl.metadata (4.4 kB)
Collecting flatbuffers>=24.3.25 (from tensorflow<3,>=2.11.0->tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading flatbuffers-24.3.25-py2.py3-none-any.whl.metadata (850 bytes)
Collecting gast!=0.5.0,!=0.5.1,!=0.5.2,>=0.2.1 (from tensorflow<3,>=2.11.0->tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading gast-0.6.0-py3-none-any.whl.metadata (1.3 kB)
Collecting google-pasta>=0.1.1 (from tensorflow<3,>=2.11.0->tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading google_pasta-0.2.0-py3-none-any.whl.metadata (814 bytes)
Collecting h5py>=3.10.0 (from tensorflow<3,>=2.11.0->tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading h5py-3.11.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.5 kB)
Collecting libclang>=13.0.0 (from tensorflow<3,>=2.11.0->tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading libclang-18.1.1-py2.py3-none-manylinux2010_x86_64.whl.metadata (5.2 kB)
Collecting ml-dtypes<0.5.0,>=0.3.1 (from tensorflow<3,>=2.11.0->tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading ml_dtypes-0.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (20 kB)
Collecting opt-einsum>=2.3.2 (from tensorflow<3,>=2.11.0->tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading opt_einsum-3.3.0-py3-none-any.whl.metadata (6.5 kB)
Collecting packaging (from tensorflow<3,>=2.11.0->tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading packaging-24.1-py3-none-any.whl.metadata (3.2 kB)
INFO: pip is looking at multiple versions of tensorflow to determine which version is compatible with other requirements. This could take a while.
Collecting tensorflow<3,>=2.11.0 (from tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading tensorflow-2.16.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.2 kB)
Collecting ml-dtypes~=0.3.1 (from tensorflow<3,>=2.11.0->tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading ml_dtypes-0.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (20 kB)
Collecting tensorflow<3,>=2.11.0 (from tensorflow-serving-api==2.11.0->-r ../../common/python/requirements.txt (line 3))
  Downloading tensorflow-2.16.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.3 kB)
ERROR: Cannot install -r ../../common/python/requirements.txt (line 3) and tensorflow-serving-api because these package versions have conflicting dependencies.

The conflict is caused by:
    tensorflow-serving-api 2.11.0 depends on protobuf<3.20 and >=3.9.2
    tensorflow 2.17.0 depends on protobuf!=4.21.0, !=4.21.1, !=4.21.2, !=4.21.3, !=4.21.4, !=4.21.5, <5.0.0dev and >=3.20.3
    tensorflow-serving-api 2.11.0 depends on protobuf<3.20 and >=3.9.2
    tensorflow 2.16.2 depends on protobuf!=4.21.0, !=4.21.1, !=4.21.2, !=4.21.3, !=4.21.4, !=4.21.5, <5.0.0dev and >=3.20.3
    tensorflow-serving-api 2.11.0 depends on protobuf<3.20 and >=3.9.2
    tensorflow 2.16.1 depends on protobuf!=4.21.0, !=4.21.1, !=4.21.2, !=4.21.3, !=4.21.4, !=4.21.5, <5.0.0dev and >=3.20.3

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
Traceback (most recent call last):
  File "/home/hil/Public/model_server/demos/person_vehicle_bike_detection/python/person_vehicle_bike_detection.py", line 30, in <module>
    from tensorflow_serving.apis import predict_pb2
ModuleNotFoundError: No module named 'tensorflow_serving'
@hilliao hilliao added the bug Something isn't working label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant