- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 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)
fig 2
fig 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.
fig 4
fig 5
fig 6 My Path
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sandesh,
Thank you for reaching out to us.
Before running the setupvars.bat script, please ensure you have installed the following prerequisites:
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:
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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:
In addition, please launch the command prompt as administrator to avoid permission issues.
Sincerely,
Zulkifli
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 Path
CMD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 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)
fig 2
fig 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.
fig 4
fig 5
fig 6 My Path
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page