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.
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
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.
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.
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
+ 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"
PS C:\Program Files (x86)\Intel\oneAPI>
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.
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.
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.
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.