You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running setup.py to install object detection API installs tensorflow==2.6.0 official in my Conda virtual environment. tensorflow-gpu==2.5.0 was already installed in the environment, and it should be used instead.
The behavior is similar to the complaint in issue #9267, except that was in a docker container. In my case, it's the Conda virtual environment.
Is this a bug? Or is it something wrong with my Conda configuration?
python -c 'import tensorflow as tf; print(tf.__version__)'
2021-09-17 17:33:17.425787: I tensorflow/stream_executor/platform/default/dso_loader.cc:53] Successfully opened dynamic library libcudart.so.11.0
2.5.0
Internally, the object detection package installs tf-models-official, which has a dependency on tensorflow-text. Pip ends up fetching the latest version of text (2.6.0), which in turn requires TF 2.6. That is probably why your TF installation is overridden.
A potential workaround could be to manually install tensorflow-text (2.4) before installing the object detection package.
Prerequisites
Please answer the following questions for yourself before submitting an issue.
1. The entire URL of the file you are using
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2.md#python-package-installation
https://github.com/tensorflow/models/blob/master/research/object_detection/packages/tf2/setup.py
2. Describe the bug
Running setup.py to install object detection API installs tensorflow==2.6.0 official in my Conda virtual environment. tensorflow-gpu==2.5.0 was already installed in the environment, and it should be used instead.
The behavior is similar to the complaint in issue #9267, except that was in a docker container. In my case, it's the Conda virtual environment.
Is this a bug? Or is it something wrong with my Conda configuration?
3. Steps to reproduce
Follow the steps below to reproduce the bug.
nano conda-env-tf25-cuda11-p36.yaml
conda -V
conda env create --file conda-env-tf25-cuda11-p36.yaml --force
conda activate env-test
python -c 'import tensorflow as tf; print(tf.__version__)'
git clone https://github.com/tensorflow/models.git
cd models/research
protoc object_detection/protos/*.proto --python_out=.
cp object_detection/packages/tf2/setup.py .
python -m pip install --use-feature=2020-resolver .
(Terminal displayed information about many packages being installed)
python -c 'import tensorflow as tf; print(tf.__version__)'
Not only was the Tensorflow version changed from 2.5.0 to 2.6.0, but also no CUDA information was displayed.
4. Expected behavior
tensorflow-gpu==2.5.0 in the Conda virtual environment should not be replaced by Tensorflow 2.6.0 CPU.
5. Additional context
Include any logs that would be helpful to diagnose the problem.
6. System information
The text was updated successfully, but these errors were encountered: