Closed AnasAr96 closed 1 year ago
we get dependency problems because we have tensorflow-macos and not the normal tensorflow. pleas ignore the part "--use-feature=2020-resolver"
To solve the dependency problems, just use the pip command "-no-deps" and type this:
python -m pip install . --no-deps
After a long research I found out that object-detection from tf2 is not compatible on M1 Macs.
but the old version of tf1 would also work without problems.
change your installation to be like: -From within TensorFlow/models/research/
cp object_detection/packages/tf1/setup.py . python -m pip install . -no-deps
After that you will face a problem with protoc. if you installed any protoc package just uninstall them and do the following:
pip install protobuf==3.9.2 go to your installation directory. If you use condo you will finde it under: PATH_TO_YOUR_CONDA_DIR/envs/YOUR_ENV/lib/python3.9/site-packages/google/protobuf/internal
copy the file "builder.py" to another directory e.g. Desktop
now install the other protoc
pip install protobuf==3.19.4
and then copy the "builder.py" to the same dir PATH_TO_YOUR_CONDA_DIR/envs/YOUR_ENV/lib/python3.9/site-packages/google/protobuf/internal
to finish the installation you also need this packages:
pip install tf-models-official --no-deps pip install pyyaml==5.3 --no-deps pip install gin-config==0.1.1 --no-deps pip install tensorflow-addons==0.16.1 --no-deps pip install typeguard== 2.13.3 --no-deps
From within TensorFlow/models/research/
ERROR: Cannot install object-detection because these package versions have conflicting dependencies.
The conflict is caused by: tf-models-official 2.11.2 depends on tensorflow-text~=2.11.0 tf-models-official 2.11.0 depends on opencv-python-headless==4.5.2.52 tf-models-official 2.10.1 depends on tensorflow-text~=2.10.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~=2.9.0 tf-models-official 2.9.1 depends on tensorflow~=2.9.0 tf-models-official 2.9.0 depends on tensorflow~=2.9.0 tf-models-official 2.8.0 depends on tensorflow~=2.8.0 tf-models-official 2.7.2 depends on tensorflow-text>=2.4.0 tf-models-official 2.7.1 depends on tensorflow-text>=2.4.0 tf-models-official 2.7.0 depends on tensorflow>=2.7.0 tf-models-official 2.6.1 depends on tensorflow-text>=2.6.0 tf-models-official 2.6.0 depends on tensorflow>=2.5.0 tf-models-official 2.5.1 depends on tensorflow>=2.5.0
To fix this you could try to: