- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not a question just letting you know the environment configurator for VSCode does not work. Fresh install of basekit on Windows 10, command prompt works fine, when trying to start the environment in vscode it pops up with Error 1, then after that window is closed it pops up as if it has worked but it hasn't.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reaching out to us.
>>when trying to start the environment in vscode it pops up with Error 1
We have tried it from our end by installing the necessary extensions (Sample Browser for Intel oneAPI Toolkits and then Environment Configurator for Intel oneAPI Toolkits) and did not get any error while setting up the oneAPI environment in VS code.
We also checked with samples from oneAPI (version 2021.3.0) by initializing environment variables (setvars.bat), and tried running the same in VS code which worked fine.
Could you please share the steps that you have followed while configuring the environment in VS code (and also the version of the oneAPI base toolkit) as we are unable to reproduce the issue.
You can refer the following link for more details
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the reply, I installed oneAPI toolkit on Windows 10 using the exe, then I added the two extensions and above images are the outcome. That is the tutorial I followed, it does not work for me, I have gone through the article a number of times to see if I missed anything.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Could you please tell us the version of the VS code which you are using?
we have tried with 1.58.0 version of VS code.
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Version is 1.57.1 I am updating now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am now in 1.58 and it is exactly the same issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This error is due to the fact that for some reason setvars could not be executed. I also see that the extension could not find the path automatically.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi thanks for the reply, oneAPI is actually working fine on the machine, it is a fresh install on Windows 10 (2021.3) and the path is default path (C: > Program Files (x86) > Intel > oneAPI > setvars.bat No it isn't possible to run it in terminal inside VSCode the following: "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" simply outputs "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" if I navigate to the directory and run setvars.bat I get:
PS C:\Program Files (x86)\Intel\oneAPI> setvars.bat
setvars.bat : The term 'setvars.bat' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is
correct and try again.
At line:1 char:1
+ setvars.bat
+ ~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (setvars.bat:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Suggestion [3,General]: The command setvars.bat was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type: ".\setvars.bat". See "get-help about_Command_Precedence" for more details.
PS C:\Program Files (x86)\Intel\oneAPI> ".\setvars.bat"
.\setvars.bat
PS C:\Program Files (x86)\Intel\oneAPI>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi mate yes running if I navigate to the oneAPI dir in VSCode terminal and run .\setvars.bat that works fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Adam, the environment setup script (setvars.bat) is a batch file that will only work from a cmd.exe session, it does not work directly in a powershell.exe session. In order to setup the oneAPI env vars in a powershell.exe session, use the following command at a PowerShell prompt:
cmd.exe "/K" '"C:\Program Files (x86)\Intel\oneAPI\setvars.bat" && powershell'
This will cause the batch file to be run in a cmd.exe session, after which a new PowerShell session will be started which inherits the modified environment variables that were created by the cmd.exe session. If you type exit from the new PowerShell session you will lose the oneAPI environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If I navigate to the oneAPI dir in VSCode and run .\setvars.bat it works fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Adam, our engineering team in charge of that plugin has been informed of this issue. --Paul
p.s. Until a fix is created, you can use the following workaround:
PS> cmd.exe "/K" '"C:\Program Files (x86)\Intel\oneAPI\setvars.bat" && powershell'
PS> code
The first line will setup the oneAPI environment by running the setvars.bat file in a cmd.exe session, and then starting a new powershell.exe session which inherits the modified env vars. The second line then start VSCode, which will also contain the env vars. In this workaround, you will not need to use the environment configuration extension, because it will have been setup at the command-line from which you startup VSCode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK thanks I was able to now get the environment running in VSCode without that, still have the issue with the plugin though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for your patience.
The issue raised by you has been fixed in the 2021.4 version. Please download and let us know if this resolves your issue.
Regards,
Vidya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We are closing this thread for now. If you need any additional information from Intel please post a new question as this thread will no longer be monitored.
Regards,
Vidya.

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