no such option: --use-feature while installing tensorflow object detection api
Asked Answered
N

4

6

I'm trying to install Tensorflow Object Detection API, following the steps at this link, which is the official installation's documentation for Tensorflow 2.

git clone https://github.com/tensorflow/models.git
> everything is ok
cd models/research/
> everything is ok
protoc object_detection/protos/*.proto --python_out=.
> everything is ok
cp object_detection/packages/tf2/setup.py .
> everything is ok
python -m pip install --use-feature=2020-resolver .

> Usage:   
>   /opt/anaconda3/envs/ml/bin/python -m pip install [options] <requirement specifier> [package-> index-options] ...
>   /opt/anaconda3/envs/ml/bin/python -m pip install [options] -r <requirements file> [package-index-options] ...
>   /opt/anaconda3/envs/ml/bin/python -m pip install [options] [-e] <vcs project url> ...
>   /opt/anaconda3/envs/ml/bin/python -m pip install [options] [-e] <local project path> ...
>   /opt/anaconda3/envs/ml/bin/python -m pip install [options] <archive url/path> ...

> no such option: --use-feature

Can someone help me understand why the installation stops as it does? I'm using macOS Mojave, Python 3.6 (on a conda virtual env), and Tensorflow 2.3.0.

Nock answered 1/9, 2020 at 11:51 Comment(8)
Same problem here. Using Ubuntu.Boylan
@CatalinaChircu what pip version are u using?Nock
20.0.2. I upgraded it and the installations started.Boylan
Comments on this issue here : github.com/tensorflow/models/blob/master/research/…Boylan
@CatalinaChircu why 20.0.2? isn't the latest version 20.2.2?Nock
I had 20.0.2 and upgraded to 20.2.2, then it worked. Now, I am on Ubuntu; I do not use conda and no venv. I just wonder if things would not be easier if using Tensorflow 1.Boylan
@CatalinaChircu upgraded to latest version... now it works! thanks a lot.Nock
Put it in a comment too, for other people to find the answer if needed.Boylan
B
15

I had the same problem, I upgraded pip version from 20.0.2 to 20.2.2, then it worked.

An issue was opened on github on this matter, check here.

Use python -m pip install --upgrade pip to upgrade pip.

Boylan answered 1/9, 2020 at 16:16 Comment(1)
i have the latest version but still getting error. $ python -m pip install -U pip >> Requirement already satisfied: pip in ./venv/lib/python3.11/site-packages (24.1)Land
I
6

For the Tensorflow installation, you can simply remove this option and use:

python -m pip install .

Read this:

pip 20.1 included an alpha version of the new resolver (hidden behind an optional --unstable-feature=resolver flag). pip 20.2 removes that flag, and includes a robust beta of the new resolver (hidden behind an optional --use-feature=2020-resolver flag) that we encourage you to test. We will continue to improve the pip dependency resolver in response to testers’ feedback. Please give us feedback through the resolver testing survey. This will help us prepare to release pip 20.3, with the new resolver on by default, in October.

Impinge answered 2/9, 2020 at 18:0 Comment(0)
N
3

just needed to upgrade pip from version 20.0.2 to 20.2.2. An issue on github has also been opened (here)

Nock answered 1/9, 2020 at 15:29 Comment(0)
P
0

This is what i did and it worked

python -m pip install --user --use-feature=fast-deps .

Prettify answered 25/11, 2022 at 9:34 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Damage

© 2022 - 2025 — McMap. All rights reserved.