- 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 fig 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
- 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 fig 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
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:
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
This will likely be fixed in the next openVINO version!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
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!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page