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.

OpenVINO Installation Error in Windows

Sandesh
Novice
844 Views

I have tried to run the setupvars.bat to setup temporary environment variables but it says "Common was unexpected at this time." attached below

I have installed the tool kit in it's default directory "C:\Program Files (x86)\Intel\openvino_2021\bin\setupvars.bat"

At first i thought both the toolkit and python should be in the same drive but it gave the same message on installing python and toolkit in the same drive 

My path and System info is attached below 

 

0 Kudos
1 Solution
Sandesh
Novice
735 Views

I finally cracked it, and it had nothing to do with the paths of CMake and Python, It was the setupvars.bat file present in the following path C:\Program Files (x86)\Intel\openvino_2021.4.752\bin Incorrect PathIncorrect Pathfig 1

In the 30th line of the file there are a few set statements but their weren't any directories as specified in the path of the set statements on further inspection i found out there's another setupvar.bat file(fig 3) present in the if statement (i.e 27th line of the parent setupvars.bat) under the opencv directory which set the path for bin in the opencv directory(as in fig 1 and fig 2)

c27b2516-9989-402a-8fa6-13daaf09f738.pngfig 2

Sandesh_2-1644086875476.pngfig 3

 

Anyway after i deleted the else statement (fig 4) it worked and the variables were initialized (fig 5) i don't know if the removal of the else statement will cause bugs in the future but for now it's running fine. 

Sandesh_0-1644086244888.pngfig 4

Sandesh_1-1644086355347.png

fig 5

Sandesh_3-1644087717238.png

fig 6 My Path

View solution in original post

6 Replies
Hairul_Intel
Moderator
805 Views

Hi Sandesh,

Thank you for reaching out to us.

 

Before running the setupvars.bat script, please ensure you have installed the following prerequisites:

  1. Microsoft Visual Studio 2019 with MSBuild
  2. CMake 3.14 or higher, 64-bit
  3. Python 3.6 - 3.8, 64-bit

 

Based on the PATH image you shared, the Python PATH should be the complete path to the location of your python.exe file of your Python installation directory. I'd also recommend installing the prerequisites by their default installation directory instead of changing it.

 

Below is my Python installation directory and the python.exe file location:

pythonpath.png

 

My Windows PATH for Python looks like this:

C:\Users\<username>\AppData\Local\Programs\Python\Python37

 

On another note, if you're using Anaconda it is not recommended to add Anaconda to the Windows PATH as this could interfere with other software as described here.

 

 

Regards,

Hairul

 

Sandesh
Novice
788 Views

Thank You, for the reply but the problem still persists i tried removing the path related to anaconda and it still didn't work and then i tried re-installing the dependencies in their default installation locations and modified their paths accordingly but it still throws the same output i have even tried to manually assign the path variables as mentioned in this Link  but it still didn't work.

Zulkifli_Intel
Moderator
779 Views

Hello Sandesh,

 

We are suggesting you uninstall and reinstall all the prerequisites:

·      Microsoft Visual Studio 2019 with MSBuild

·      CMake 3.14 or higher, 64-bit

·      Python 3.6 - 3.8, 64-bit

 

As part of this installation, make sure you click the option Add Python 3.x to PATH to add Python to your PATH environment variable.

 

Your environment variable should look like this:

environment variable.PNG 

 

In addition, please launch the command prompt as administrator to avoid permission issues.

 

Sincerely,

Zulkifli 

 

Sandesh
Novice
763 Views

Yes i reinstalled the toolkit and the dependencies in their default directories and have set their paths accordingly but it still shows the same error PathPath

 

 

CMDCMD

Sandesh
Novice
736 Views

I finally cracked it, and it had nothing to do with the paths of CMake and Python, It was the setupvars.bat file present in the following path C:\Program Files (x86)\Intel\openvino_2021.4.752\bin Incorrect PathIncorrect Pathfig 1

In the 30th line of the file there are a few set statements but their weren't any directories as specified in the path of the set statements on further inspection i found out there's another setupvar.bat file(fig 3) present in the if statement (i.e 27th line of the parent setupvars.bat) under the opencv directory which set the path for bin in the opencv directory(as in fig 1 and fig 2)

c27b2516-9989-402a-8fa6-13daaf09f738.pngfig 2

Sandesh_2-1644086875476.pngfig 3

 

Anyway after i deleted the else statement (fig 4) it worked and the variables were initialized (fig 5) i don't know if the removal of the else statement will cause bugs in the future but for now it's running fine. 

Sandesh_0-1644086244888.pngfig 4

Sandesh_1-1644086355347.png

fig 5

Sandesh_3-1644087717238.png

fig 6 My Path

Hairul_Intel
Moderator
697 Views

Hi Sandesh,

Glad to know that your issue has been resolved.


This thread will no longer be monitored since this issue has been resolved. If you need any additional information from Intel, please submit a new question.



Regards,

Hairul


Reply