Neon AI CIO Review 2022 Award

Video - Neon AI: Windows Option - Subsystem for Linux

 

 

Today, we're going to look at how to install Neon on a Windows computer. This method is not recommended over installing Ubuntu on your computer, but it is an option for a development system, if you would like to use development tools in Windows. Let's get started.

Enabling the Windows Subsystem for Linux
To get started installing the Ubuntu subsystem for Windows, we're going to open up a PowerShell terminal here as administrator. I'm going to type in this command:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

and that'll take a minute to run, and then it'll prompt to restart.

Installing Ubuntu for WSL
Okay, so we've restarted and we're back at the desktop. We're going to open up the Microsoft Store, and we're going to search for Ubuntu. We want 18.04. Go ahead and click on "Get", say "No Thanks" to the Microsoft account, and it's going to go ahead and download and install. Now that's done, we got the pop-up to launch it. We'll do that, close out of the store, and now this may take a little while to install, but it's going to do all of that and we'll check back when it's finished.

Setting up Ubuntu and Looking at the File System
Alright, so it's done installing. Now we're going to create a new username, and a password. Now we have an Ubuntu system ready to go. Just take a look, it'll look pretty familiar in terms of file system; and then an important thing to note is: if we go to our /mnt directory, we have /c, and that is the root of our Windows hard drive. So, that's probably the easiest way to share data between your two systems. I would recommend here, either in C making a new directory for Neon, or if you want you can put it in your Windows user folder if you share your Windows computer and are concerned about permissions. But just to show, if I make a new directory here, call it Neon. When I go back to our Ubuntu terminal, we have our directory Neon.

Starting a Neon Installation
To continue with our Neon setup on a Windows computer, I've copied our setup files. If we go to C:, the folder we made last time, I've got the same four files we would use to install on any device. And then I type into my Linux terminal bash /mnt/c/Neon/neonSetup.sh and you'll see this is very much the same process as installing on a Linux computer at this point. So, at this point I'm going to refer to that video for how to continue, and then I'll come back here to show what startup will look like on a Windows Device.

Modifying Neon to Work on Windows
So, now that installation of Neon is complete here, we're going to have to make some manual changes to get this to cooperate with our Ubuntu subsystem. First, I'm going to download notepad++. You could use a different program, notepad++ is a good free text editor that works on Windows. The newest versions of notepad are adding support for Linux line endings, but not all machines have automatically updated at this time, so I'm still recommending grabbing notepad++. We'll run that, English, next, read the license terms and agree. Perfect; so now I'm going to go into NeonAI and go to start_neon.sh, edit with notepad++. So, the GUI isn't going to work, and also our clapper is not going to work. So I'm going to comment out clapper there. And then for the GUI-- also comment out the killing the clapper since it's never going to be started. That won't affect it-- won't affect anything if you leave that here, it'll get logged to the console that there was no process to kill. So we've got that; I'm going to go down to where we actually call GUI; I'm going to comment that out there. I'm going to add a log-- or not a log, but just an echo here, so that if we try and call it with GUI, we get some response. Just in case we forget what we're doing. And then the all option is no longer going to call GUI, perfect. Alright, so now we'll close that out.

Testing Neon
I'm going to open up another Ubuntu terminal and we can start Neon the same way we would on an Ubuntu machine, and remember our path is /mnt/c/Neon/NeonAI/startNeon.sh debug. And we can go back and comment out all of our pulse audio-- everything related to audio basically. Because those are not going to work in the subsystem; same with this listener error message, we're not going to have any input devices. So again, this is for very limited testing, you're limited only to text input, but that does work. So if I were to type in "what time is it", we do still get our response there. Give another quick test here... Give a Wolfram request and we get our Wolfram response back. So, if at all possible, I would definitely recommend running in either an Ubuntu virtual machine, or possibly dual booting your computer with Ubuntu, over using the subsystem. But if you have an IDE that's only available on Windows that you really prefer to use, you can make your changes there, do some limited testing in the subsystem, and then push it on to your testing device.

WSL Developments
I do want to note here that the Windows subsystem for Linux is being actively developed and I'll link in the description here, a link to their user voice page, where people are requesting ALSA support. If you go through the comments here there are some workarounds you can try. I personally don't know that any of these work at this point in time, last I checked these patches have been intermittent, as far as compatibility with updates to the windows subsystem for Linux.

Thanks for watching this Neon AI tutorial. Be sure to head over to neongecko.com [neon.ai now] for more information, including a written transcript of this tutorial and any code snippets we may have used. See you next time.