'Installing Tensorflow's object_detection library installs a higher tensorflow version and breaks tensorflow-gpu?

I'm using these commands from their official tutorial:

git clone --depth 1 https://github.com/tensorflow/models
cd models/research/
protoc object_detection/protos/*.proto --python_out=.
cp object_detection/packages/tf2/setup.py .
python -m pip install .

I have tensorflow 2.7 installed on the GPU, using this command:

conda create -n tf2.7 -c conda-forge cudatoolkit tensorflow=2.7.0 python=3.10

However, the installation explicitly says it's installing tensorflow 2.8 and deleting the 2.7 version, which also causes tensorflow to not recognize the GPU. Is there a fix for this? Thanks in advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source