Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6574 ディスカッション

OpenVINO Installation Error in Windows

Sandesh
初心者
9,143件の閲覧回数

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 件の賞賛
1 解決策
Sandesh
初心者
9,034件の閲覧回数

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

元の投稿で解決策を見る

10 返答(返信)
Hairul_Intel
モデレーター
9,104件の閲覧回数

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
初心者
9,087件の閲覧回数

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
モデレーター
9,078件の閲覧回数

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
初心者
9,062件の閲覧回数

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
初心者
9,035件の閲覧回数

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
モデレーター
8,996件の閲覧回数

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


hunkyu
ビギナー
5,594件の閲覧回数

Hi Intel guys,

Good afternoon.

I am ODM engineer Hunk Yu from Taiwan.

I would like to know how to setup OPENVINO Enviromint?

I met some issue as below, please help me to next step.

Thanks

hunkyu_0-1720197362133.png

 

JoyfulV1r4j
従業員
5,354件の閲覧回数

Hi @hunkyu 

 

I faced the same issue and fixed it as described below:

 

This is a bug in the setupvars.bat file in 2024.2, affecting these code lines in the file:

JoyfulV1r4j_0-1720800280586.png

 

There are 3 potential resolutions you can do (you just need to do 1 of them)

1) Modify the setupvars.bat file, by deleting / commenting line 37 and 40. Running setupvars.bat again, you should see the OpenVINO environment initialize. For example, by commenting those lines it would look like this:

JoyfulV1r4j_0-1721421909508.png

 

2) Move the openvino 2024.2.0 installation folder outside of "Program Files (x86)". I think maybe some special character in the path is causing a problem. For example, I moved the installation folder to C:\ , and setupvars.bat worked without touching the code lines

3) Try OpenVINO 2024.1 , if 2024.2 is not required. 

 

I can confirm all 3 resolutions on my side are working to fix this issue. Sorry for the difficulty in setting up your environment, hope this helps. By the way, I am using Python 3.10.11

JoyfulV1r4j_1-1720800614338.png

 

This will likely be fixed in the next openVINO version!

hunkyu
ビギナー
5,127件の閲覧回数

Hi @JoyfulV1r4j ,

Thanks for your responsing, quickly.

It's strong helpful for me, and OpenVINO initialized already.

But, something error show my CMD windows. like as below picture.

It feedback me about "cmake is not recognized as an internal or external command"

Could you plaese teach me how to fix it?

Thnaks

BTW, my Python version is 3.12.4.

hunkyu_0-1721014473091.png

 

JoyfulV1r4j
従業員
4,941件の閲覧回数

Hi @hunkyu 

Thanks for reaching out, I apologize that my prior reply was not as clear as it should have been. I fixed the reply, please check resolution #1

There is also another way to fix it, you can simply do this if you like:

JoyfulV1r4j_2-1721422350863.png

 

So make your lines of code exactly as shown above. Note this is only for OpenVINO 2024.2 version.

Please only do either 1 of the 3 resolutions, or the above resolution. No need to do multiple.

Hope this helps!

 

返信