LEARN MOJO TUTORIAL - 22 HOW TO UPDATE MOJO RIGHT INSIDE VISUAL STUDIO CODE

Pubblicato il: 01 gennaio 1970
sul canale di: Learn Mojo Tutorial - Simple AI Tutorial
106
1

In this video we are going to talk about the new version of Mojo that has been released before the weekend. And we will talk about one or two things that might improve your experience. So let's see what's up with Mojo.

This is the last file that we have created.

If you haven't seen the video, we have created a very simplified calculator. We have imported some files with self created functions and that was on Friday. And now on Sunday I have seen that Mojo actually released a new update. So my current version is Mojo zero three one. And I have noticed on Friday that I no longer was able to run my code here. So let's see if we can get the new version and if it fixes this problem. By the way, on their website they say if your current version is below 0.3, you need some additional commands. The first one would be to do sudo apt-get update to update the index files for the repositories. The second command would be sudo apt-get installl modular which I already have done. You can check if you have done it before by using this command. That's modular hyphen hyphen version. And if your Mojo version is below 0.3, the next command would be to input modular clean. That will basically clean up everything. I don't do that here. And finally you would do modular install mojo to install the current modular version. I don't need to do that.

So what I'm going to do is to use this command modular update mojo. I'm doing it right inside of Visual Studio code. I hope that it will work. Actually, I have to admit, if you haven't seen the videos about the installation, that could be pretty painful when you screw up your current installation.

So let's see if that works.

And here it says it found the current release that is from Friday 0.4 and it's updating the current version. Once again we see downloading artifacts. I have seen that in the past when I did the first install and it could take up to five minutes before you see anything happen. Now it's collecting necessary files.

So let's see how it goes.

And now it did some downloads. And by the way, you see this little pop up below says the Mojo language server file has changed. Do you want to reload the server? I'm not sure I can say yes, Always or never. I say yes. If you are interested, you see that you can also look at the docs.Modular.com/Mojo for more information. Now let's check the version. And the current version was installed. I now have Mojo 0.4. I will now close Visual Studio code, reload it and let's see if I'm able to run my files. This error here remains. So let's switch to the terminal. You could do that by pressing CTRL Shift and this special key. Or you can click on View terminal.

Let's clear the output.

Now I'm going to activate my virtual environment. From the home folder, you can see it's been activated because we see the term Mojo in front of the prompt. Now let's go to projects. There we have the simple calculator functions. Let's go into that directory and run Mojo, my main file, Mojo. And it actually works. So in my case, the update was successful. I still don't understand why I'm not able to run my code here. Because that was working with the last version. I might have messed up something in Visual Studio code, but this is something for a different video. For this one, you have learned how to do an update. For your current Mojo version. I say, thank you for watching, and I will see you in the next video.


In questa pagina del sito puoi guardare il video online LEARN MOJO TUTORIAL - 22 HOW TO UPDATE MOJO RIGHT INSIDE VISUAL STUDIO CODE della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Learn Mojo Tutorial - Simple AI Tutorial 01 gennaio 1970, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 106 volte e gli è piaciuto 1 spettatori. Buona visione!