Intel® Distribution of OpenVINO™ Toolkit
Community support and discussions about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all things computer vision-related on Intel® platforms.
6066 Discussions

training_extensions New installation two errors?

DaveBGld
Beginner
572 Views

Following instructions from [quick start guide](https://github.com/openvinotoolkit/training_extensions/blob/develop/QUICK_START_GUIDE.md), did the following:
`git clone https://github.com/openvinotoolkit/training_extensions.git
```cd training_extensions
git clone https://github.com/openvinotoolkit/training_extensions.git
cd training_extensions
git checkout -b develop origin/develop
```
The last line results in error:

> **fatal: A branch named 'develop' already exists**

 

Seems to me this is an error in the script to fetch the repo.

 

I still went ahead and run

`git submodule update --init --recursive`

> git submodule update --init --recursive
> Submodule 'external/deep-object-reid' (https://github.com/openvinotoolkit/deep-object-reid) registered for path 'external/deep-object-reid/submodule'
> Submodule 'external/mmdetection' (https://github.com/openvinotoolkit/mmdetection) registered for path 'external/mmdetection/submodule'
> Submodule 'external/mmsegmentation' (https://github.com/openvinotoolkit/mmsegmentation) registered for path 'external/mmsegmentation/submodule'
> Submodule 'external/model-preparation-algorithm/submodule' (https://github.com/openvinotoolkit/model_preparation_algorithm) registered for path 'external/model-preparation-algorithm/submodule'
> Cloning into '/home/david/Downloads/training_extensions/external/deep-object-reid/submodule'...
> Cloning into '/home/david/Downloads/training_extensions/external/mmdetection/submodule'...
> Cloning into '/home/david/Downloads/training_extensions/external/mmsegmentation/submodule'...
> Cloning into '/home/david/Downloads/training_extensions/external/model-preparation-algorithm/submodule'...
> Submodule path 'external/deep-object-reid/submodule': checked out '8376d3ec0d3ceaf540020a070661739cddd9110b'
> Submodule path 'external/mmdetection/submodule': checked out 'ca19197237ab5ecb7e7a27514bd4f464f6d379a6'
> Submodule path 'external/mmsegmentation/submodule': checked out '571a0d38069588787916c682d94888614352972b'
> Submodule path 'external/model-preparation-algorithm/submodule': checked out '8d36bf5944837b7a3d22fc2c3a4cb93423619fc2'

Then after

`find external/ -name init_venv.sh`

and

```
TASK_ALGO_DIR=./external/mmsegmentation/
bash $TASK_ALGO_DIR/init_venv.sh ./cur_task_venv python3.8
source ./cur_task_venv/bin/activate
pip3 install -e ote_cli/ -c $TASK_ALGO_DIR/constraints.txt
````

And then
`ote find --root $TASK_ALGO_DIR`

results in error **ModuleNotFoundError: No module named 'ote_sdk'**:

> (segmentation) david@AI01:~/Downloads/training_extensions$ ote find --root $TASK_ALGO_DIR
> Traceback (most recent call last):
> File "/home/david/Downloads/training_extensions/cur_task_venv/bin/ote", line 11, in <module>
> load_entry_point('ote-cli', 'console_scripts', 'ote')()
> File "/home/david/Downloads/training_extensions/cur_task_venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
> return get_distribution(dist).load_entry_point(group, name)
> File "/home/david/Downloads/training_extensions/cur_task_venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
> return ep.load()
> File "/home/david/Downloads/training_extensions/cur_task_venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2443, in load
> return self.resolve()
> File "/home/david/Downloads/training_extensions/cur_task_venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2449, in resolve
> module = __import__(self.module_name, fromlist=['__name__'], level=0)
> File "/home/david/Downloads/training_extensions/ote_cli/ote_cli/tools/ote.py", line 22, in <module>
> from .demo import main as ote_demo
> File "/home/david/Downloads/training_extensions/ote_cli/ote_cli/tools/demo.py", line 25, in <module>
> from ote_sdk.configuration.helper import create
> ModuleNotFoundError: No module named 'ote_sdk'
>

 

I installed successfully in a fresh ubuntu install, so  in a think this is because I already have some python libraries that conflict, but before I reinstall my main development compute was hoping for some guidance.

 

Thanks!

0 Kudos
8 Replies
Peh_Intel
Moderator
535 Views

Hi DaveBGld,


Thanks for reaching out to us.


The command: git checkout -b develop origin/develop has been removed 2 days ago. More details about the error can refer to this Stack Overflow discussion.


Regarding the error (ModuleNotFoundError: No module named 'ote_sdk'), you can run the setup file for OTE SDK.


cd ote_sdk

python3 setup.py install

cd ..

ote find --root $TASK_ALGO_DIR



Regards,

Peh


DaveBGld
Beginner
528 Views

Did as you recommend, and completed with no errors, but ote is still unknown. I tried with a virtualenv and out using sudo.

 

TASK_ALGO_DIR=./external/mmdetection/
source ./cur_task_venv/bin/activate
cd ote_sdk
python3 setup.py install
ote find --root $TASK_ALGO_DIR

Results in

 

Command 'ote' not found,

 

Is there a path I need to take care of?

 

Attaching the installation log with all commands:

.

 

Many thanks!!

 

 

Peh_Intel
Moderator
510 Views

Hi DaveBGld,


Previously, you have done the installation of ote_cli for the mmsegmentation but didn’t run the setup file for OTE SDK. Hence, received error: No module named ‘ote_sdk’.


Now, I noticed that you missed out the installation of ote_cli for mmdetection. Hence, the ote command is not found.

pip3 install -e ote_cli/ -c $TASK_ALGO_DIR/constraints.txt



Regards,

Peh


DaveBGld
Beginner
477 Views

Thanks for your reply.

 

I had installed ote.

 

In any case, I repeated by deleting the directory for venv, and run

 

TASK_ALGO_DIR=./external/mmdetection/
bash $TASK_ALGO_DIR/init_venv.sh ./cur_task_venv python3.8
source ./cur_task_venv/bin/activate
pip3 install -e ote_cli/ -c $TASK_ALGO_DIR/constraints.txt

 

That resulted in  error

error: invalid command 'bdist_wheel'

The complete console output is attached as extensions install try 1.txt

 

Deleted the venv and reinstalled, only this time installed wheel before ote

 

TASK_ALGO_DIR=./external/mmdetection/
bash $TASK_ALGO_DIR/init_venv.sh ./cur_task_venv python3.8
source ./cur_task_venv/bin/activate
pip3 install wheel
pip3 install -e ote_cli/ -c $TASK_ALGO_DIR/constraints.txt

 

But now another error:

 

ERROR: jupyter-client 7.3.1 has requirement python-dateutil>=2.8.2, but you'll have python-dateutil 2.8.1 which is incompatible.

 

The complete console output is attached as extensions install try 2.txt

 

Changed the ./external/mmdetection/constraints.txt so that python-dateutil==2.8.2

 

Deleted the venv again, and rerun, this time no errors except that running

 

ote find --root $TASK_ALGO_DIR

 

results in error:

ModuleNotFoundError: No module named 'ote_sdk'

The complete console output is attached as extensions install try 3.txt

 

Could it be that the problem is with the venv creation/initialization?

 

Thanks again

 

Peh_Intel
Moderator
469 Views

Hi DaveBGld,


You are getting back the same error which can be solved by running the setup file for OTE SDK.


Please have a try again in your third virtual environment (extensions install try 3.txt) by running the commands below:

#open new terminal

cd <your_training_extension_directory>

source ./cur_task_venv/bin/activate

cd ote_sdk

python3 setup.py install

cd ..

TASK_ALGO_DIR=./external/mmdetection/

ote find --root $TASK_ALGO_DIR

 

 

Regards,

Peh


DaveBGld
Beginner
458 Views

Thanks Peh! I ap[appreciate your patience.

I ran as you instructed and this time I get a different error:

 

ModuleNotFoundError: No module named 'torch'

 

The complete console output for all the commands is attached.

 

 

Peh_Intel
Moderator
443 Views

Hi DaveBGld,


Glad to hear that you’re making progress in setting up OpenVINO™ Training Extensions.

 

Have you tried to install PyTorch through the command below?

pip3 install torchvision

 

 

Regards,

Peh



Peh_Intel
Moderator
406 Views

Hi DaveBGld,


This thread will no longer be monitored since we have provided solutions. If you need any additional information from Intel, please submit a new question. 



Regards,

Peh


Reply