How to install and run Lua in Windows
Тәжірибелік нұсқаулар және стиль
The hardest part of this is probably the download! The website makes it somewhat confusing when trying to download the Lua binaries... After the download however, it's simply moving Lua to a desired location, then adding it to your PATH, so you can execute Lua from the console/terminal :)
Lua website: www.lua.org
Subscribe for more videos!
KZread: kzread.info...
Odysee: odysee.com/$/invite/@steveste...
For more programming videos, feel free to subscribe to my 2nd channel: / @programmervibe
Python Programming Tutorials: • (Old) Python Programmi...
C++ Programming Tutorials: • C++ Tutorials
Lua Programming Tutorials: • Lua Programming Tutorials
Become a Web Developer: • Become a Web Developer
HTML Tutorials: • HTML Course
TKinter Tutorials: • Tkinter Tutorials
Linux Tutorials/Videos: • Linux Videos
Delphi Programming Tutorials: • Delphi Programming (Tu...
Web Scraping/Beautiful Soup Tutorials: • Beautiful Soup Tutorial
Love2D Game Dev Tutorials: • Love2D Game Dev Tutorials
Godot Game Dev Tutorials: • Godot Game Dev Tutorials
How-to videos: • How to
Crash Courses: • Crash Courses
MySQL Tutorials: • MySQL Tutorials
Japanese Lessons: • Japanese Lessons
Group Chats:
Weeb Chat: t.me/weeb_haven
Programmer Haven: t.me/programmer_haven
You can contact me on:
Email: StevesTeacherYT@gmail.com
Discord: / discord
Kitsu: kitsu.io/users/Netsu
Twitter: @stevesteacherYT or click here: stevesteacherYT?s=09
Hey there!!! Wanna help support the channel :D? You can donate on PayPal: paypal.me/stephenvdw?locale.x...
Any suggestions? Leave it in the comment section or contact me somewhere else!
Odysee Links:
Python Programming Tutorials: odysee.com/@stevesteacher:0/P...
C++ Programming Tutorials: odysee.com/@stevesteacher:0/C...
HTML Tutorials: odysee.com/@stevesteacher:0/H...
Tkinter Tutorials: odysee.com/@stevesteacher:0/T...
Linux Tutorials: odysee.com/@stevesteacher:0/L...
Lua Tutorials: odysee.com/@stevesteacher:0/L...
Love2D Game Dev Tutorials: odysee.com/@stevesteacher:0/L...
Delphi Tutorials: odysee.com/@stevesteacher:0/D...
MySQL Tutorials: odysee.com/@stevesteacher:0/M...
Thank you for watching!
#stevesteacher #lua #howto #windows
Пікірлер: 238
Frequently Asked Questions (FAQs)! Please read if you have any questions! Q. I don't see a .txt when I rename the file A. You most likely don't have "Show file extensions" enabled. Once you open up the file in VSCode (or your preffered code editor), you should be able to remove the .txt. Q. I can't remove the .txt in my code editor A. Enable "Show file extensions' by clicking on the "View" tab, at the very top of your Windows file explorer and enable the option Q. Does a different version of Lua change how Lua works? A. No and yes. Lua 5.x will have different functions than Lua 4.x, 3.x etc. However, for this tutorial, what version of Lua you use does not matter Q. Will you make more tutorials? A. I already have! Lua Crash Course: kzread.info/dash/bejne/Y6emqM-jpJSvkpM.html Love2D Crash Course: kzread.info/dash/bejne/e2lom6Vvg9C7ns4.html Q. When I run "lua main.lua" I don't get any output A. Remember to *save* your file before you run it Q. I get "Command not recognized as an internal or external command" A. Make sure Lua is in your path, and make sure you reference your Lua version, watch 3:35 again Q. What IDE is best for Lua? A. The better question is, what IDE/Text Editor is best for YOU. I like VSCode, you might too, or you might like Sublime Text or ZeroBrane Q. Is it worth learning Lua in 2023? A. Yes, yes it is :) Q. Can I use Lua for Roblox? A. Roblox uses Luau (which is a version of Lua), most Lua is valid Luau code, so yes ;) Q. My question isn't in the FAQs A. Post a new comment asking your question, and I will most likely respond and help ;) -- don't reply your question to this comment, I might not receive a notification :(
@oof69-420
Жыл бұрын
..
@Pyronek
Жыл бұрын
Did everything but what do I do to open lua now just open lua53?
@Pyronek
Жыл бұрын
Also the command only works in powershell
@onlyamen2034
Жыл бұрын
Can you show all link of exe please.
I so appreciate the beginner-friendly pace and detailed explanations for each step. Found this much easier to follow than I had expected! Thank you!
Thank you SO much, ive seen several videos, tutorials websites, etc. and not one of them has been able to explain it well enough for me to understand. You have ended my weeklong struggle 😊
Literally the only helpful tutorial I found in hours for getting past the initial issue I was facing, big thanks. Everyone else just said "just look it up" without ever specifying what "it" is.
@Stevesteacher
Жыл бұрын
Glad it helped! :D
Thanks a lot, all this was super confusing I just wanted to switch from 5.1 to the current release but this video made it 100x easier 👍👍
THANK YOU SO MUCH. I've been trying to figure out how to use Lua for over a week now and was getting so frustrated with "beginner" videos that use language and shortcuts I didn't understand. You explained it all perfectly. Thank you Thank you Thank you
Thank you so much man! I struggled at the last bit but I made it through! Thank you for making this video!!!!!
Thank you, I am an Iranian, and there was no such tutorial on KZread in Iran, and your video was the only English tutorial that worked for me. ❤
Fantastic tutorial, which even I was able to understand and follow (-: 👍
Thank you! Lua seems like a good language to learn, but... installing it is like fighting the tutorial boss in a game you don't know how to play before the tutorial.
@Stevesteacher
Жыл бұрын
I know right! It is an issue with so many programming languages on Windows, the setup is sometimes just too difficult :')
loving your explanation method. Thanks a lot
thank you for walking through the download! Finding the file was nearly the hardest part lol
good job bro , just found you today , keep it up
@Stevesteacher
2 жыл бұрын
Thank you I Appreciate it! :D
Extremely good tutorial! I was hesitant to use binary, but I know self-compiling is unreasonable.
@Ghazi_Al_Tamimi
2 жыл бұрын
What is self compiling
@Stevesteacher
2 жыл бұрын
@@Ghazi_Al_Tamimi self-compiling is when you compile the source code of something yourself, this often requires you to install and configure all the dependencies required to do so, then spend the next few hours waiting for the compiler to give you a .exe file you can use Lua already provides the .exe files for us, so we don't have to go through the effort of creating it manually :)
@Ghazi_Al_Tamimi
2 жыл бұрын
@@Stevesteacher oh ok thank you
@fininsanic4978
Жыл бұрын
@@Stevesteacher how do you open the Lua program? is it just command prompts? or do I open the application?
You helped me a lot, thank you so much! :D
Thanks for the tutotial!
thank you this was so annoying to learn lol really appreciate the clear tutorial!
This was the easiest tutorial I ever followed! Thanks!
@Stevesteacher
Жыл бұрын
You're welcome! :D
if you are having an issue finding the file extensions go to your files, click view, then click 'file name extensions' it will show the txt file link. then you can delete it! thanks for this video!
@seifbanana
Жыл бұрын
thanks i had a problem with this
i tired install lua all day, and exactly this video helpde me to install lua. thank you very much!
@user-up8po5qj7w
2 жыл бұрын
Steve's teacher are you checking comments all the time😂
@Stevesteacher
2 жыл бұрын
Of course ;)
@user-up8po5qj7w
2 жыл бұрын
Steve's teacher i'm living in Ukraine and it's 22 o'clock/10 pm
very helpful thanks!
Thx for the video. I'm brazilian and i had no idea Lua was made by brazilians until i saw "PUC-Rio" in the prompt haha. It's a famous university in Rio de Janeiro. Just saw the logo and now it makes sense for it to be a moon, as "Lua" means moon in portuguese.
which one do i click to install for mac? the MacOS X Executables or Library and Includes
man smashed his keyboard for this description bro...
how do i pull up the user name again to like exit the lua prompt? How are you hitting tab and a bunch of stuff is autocompleting?
theytold me when i type lua53 main.lua then enter that there is no such file or directory what i need to do?
6:58 when i click "Open PowerShell window here" it closes almost immidiately, do you know what could be causing that
Thank You Sensei.
You're a life saver!
nice captions bro
I thank you for all the numbers of coding
I just started learning lua today and i have loads of questions but first of all is does choosing a different lua version changes how it works or just stuff that doesnt matter
@Stevesteacher
2 жыл бұрын
It mostly doesn't matter, but somewhere between the last 3 Lua versions it dropped support for a lot of packages for Lua (that you can download and use with Lua), Lua5.3 is the one I prefer with still all of the support, but you can download the latest versions and just downgrade if you need support for something, Lua itself hasn't changed tho, just the support
how do you do that with the text dokument when i do it it doesnt spell .txt it just speels text dokument
Thank you you helped a lot. Lua for starters is definitely not user friendly especially if you don't know much coding!
@Stevesteacher
9 ай бұрын
Lua is really bad when it comes to installing and running it unfortunately... Most programming languages seems to have the same difficulties on Windows when not installed via an IDE (fancy text editor) However, Lua itself is one of the easiest languages to learn, as it is one of the smallest programming languages and also doesn't have very complicated features such as typing your variables, macros, memory management etc.
Very nice tutorial but when i try to edit the environment variable it can only make me change the name and not add another one inside
amazing video
Legend. Thank you!
@Stevesteacher
Жыл бұрын
Glad it helped! :D
Thank you so much
press CTRL+L to open the address bar in file explorer, type cmd, press enter, prompt opens to your current directory
what do you do if you dont have the .txt cause i feel like its stopping from putting main.lua in CodeVS
@Stevesteacher
8 ай бұрын
Just open the file in VSCode and rename it from there ;)
i cant click on edit if i click path in environment varible
Thank you
thank you very much
it wont let me get into path to change the file. When I tried to restart it, it still did not work.
Hey when i try to open the lua53 app it says that it may be a virus idk why tho
ok, so somehow my document didnt change into a lua file, but when i typed its name into the command prompt and added a .txt to its end, it still worked. Not ideal, (i dont know why it wont let me change the document into a lua file) but at least it still works. Thank you very much, it was very helpful
I need help i don't have the system properties in poland
THANK U SO MUCH!!!
Hey Steve, at 5:55 how did you exit Lua to go back at drive C on window prompt?
@Stevesteacher
Жыл бұрын
ctrl+d or ctrl+z
when i downloaded the lua and print("test") it worked but when i made the main.lua it says (i coped):'lua63' is not recognized as an internal or external command, operable program or batch file.
@adriansalasflores1860
Жыл бұрын
Try main.lua.txt insted main.lua
Great tutorial! Thanks.
@Stevesteacher
2 жыл бұрын
Always happy to help ;)
i have this problem where when I click the Lua binaries download page it shows . Connection is not secure, and it wont let me visit the page
@Stevesteacher
7 ай бұрын
Make sure you're on www.lua.org , google with often put ad links before official links when you search with it, so using the link I provide you may take you to the correct site if you googled Lua instead of going there by direct links
pls make a tutorial about how to install luafs via luarocks on windows... putting luafs´s exe into the lua folder and then using it is no problem, but installing luafs or something else is. It downloades the packages fine but then gives me an error "failed to build" and something with like "needs to be executed in a visual studio dev terminal". But as i tried that it wont work as well.... Please help me 🙏
You're really funny. Subscribed
thx!
When I get to the part where you make the Lua file and add a new text document and change it to a .lua, I dont have the option to change it and when I do the save as, the only file type I see is a .txt
@PewPewCricket
Жыл бұрын
in file explorer at the top click view and then check the box that says show file extensions
@zoneziane4894
Жыл бұрын
If you still have this question he answered it in his comment under the video
I actually want to give you a million pat on the backs for this video, THANK YOUUUU!!!!!!!!
hell is real judgement day is coming
everytime i reach the end and try using the document to type it tells me lua53: cannot open main.lua: No such file or directory
@Stevesteacher
2 жыл бұрын
Make sure main.lua is inside that directory (folder), type "dir" and see if you see a main.lua
how do i install lfs?
says "The term 'lua' is not recognized as the name of a cmdlet, function, script file, or operable program." How do I fix this? Ive already made a path for it and followed the steps in the video.
@Stevesteacher
Жыл бұрын
Try rebooting, if it does not work, try following the video again, if it still does not work, try installing Lua via Chocolatey or Winget
I have a problem were it does not want to register the text document ("i am cool") any ideas?
@cattokomo
2 жыл бұрын
change the file extension to .lua (ex : .txt -> .lua)
I did it correctly but my files aren't turning into lua-.. help-
My notepad refused to open why tho??? Pls help
When i try to open the main.lua file with pwsh it closes pswh immediately before it closes it says "failed because the file does not have a `.psi` extension . Specify a valid PowerShell script file name, and then try again."
@Stevesteacher
Жыл бұрын
Right click the file and say "open with" and choose VSCode or Notepad
Hello,Im unable to see the .txt when making a new text file how do I fix this issue?
@spagghetipenis4211
2 жыл бұрын
for example i make main.lua and it shows up as main.lua.exe
@Stevesteacher
2 жыл бұрын
Then your system might be a bit different, the main idea is that your file should end in .lua (so in your case, remove the .exe)
@eliyahsegura5058
2 жыл бұрын
u can open the text document then save it as, then just remove exe and put .lua
How do you make it go from > to C:\Users amehere>53
@Stevesteacher
10 ай бұрын
It should open up in your home directory by default, or in a specific folder if specified (like in the video) You can also use the "cd" command to change folders, I recommend learning a little bit about the command prompt on Windows, it can go a long way once you become a more skilled programmer, even if not a required skill to learn
2:35 mine does not look the same, none of them end in .exe this is what mine looks like. lua53.dll lua53 luac53 wlua53 is it still okay to continue with the rest of the process or do i need .exe at the end of these? i did everything the same -except when the download began it went to my "free download manager" to download.
@Stevesteacher
2 жыл бұрын
You can continue, you just haven't enabled "Show file name extension" in your Windows, so lua53 and luac53 and wlua53 actually have a .exe, Windows is just hiding it ;)
@lluminaughty
2 жыл бұрын
@@Stevesteacher thanks!
@lluminaughty
2 жыл бұрын
Sorry, now I’m at 7:16 where if it did not work, open command prompt, copy and paste the address etc. well I get to the part where I type “ lua53 main.Lua” and it responds “ lua53: cannot open main.lua:no such file or directory” Any ideas? Thanks
@Stevesteacher
2 жыл бұрын
@@lluminaughty 1. Make sure you did create a main.lua file 2. Casing matters! main.Lua is not the same as main.lua 3. Make sure you are in the same folder as that lua file, you can use 'dir' to see what files are in the folder you're currenly in
the "lua.exe" doesnt appear for me after downloading 5.3.6
@UsTube.
5 ай бұрын
Me to
can we take a moment to appreciate that Lua's entire compiler bundle is less than a megabtye big
thanks
Can this fix vs code supporting lua
@Stevesteacher
2 жыл бұрын
Possibly? Not quite sure what support you're talking about tho... Maybe you should install a Lua extension?
i keep having this 'lua53' is not recognized as an internal or external command, operable program or batch file. problem
@Stevesteacher
Жыл бұрын
Make sure Lua is in your path, and make sure you reference the correct Lua version (if you installed a different version), watch 3:35 again
@slim_brian
Жыл бұрын
@@Stevesteacher yeah, fixed before i made the comment shortly. thanks for the video!
Can u make a video of windows 7?
i keep seeing lua53: cannot open main.lua: No such file or directory... any fixes?
@Stevesteacher
10 ай бұрын
You need to create a main.lua file, and then run that file *in the same folder* that the file was created in. If you opened the project in VSCode, it will open the VSCode terminal in the same folder as that file. Luckily it seems Lua was correctly installed. If you're using VSCode, I also recommend you checking out this video, as it will also answer questions you may have later: kzread.info/dash/bejne/d2R224-Bfse3aJM.html I also recommend you watch these 2 short videos to get yourself familiar with the command line on Windows: Intro: kzread.info/dash/bejne/f3Z2ubigdZPLp84.htmlsi=zSGrINCmeK91AF4O Listing: kzread.info/dash/bejne/aXV2zcWBfMetj6Q.htmlsi=_KBJ8YPRzj-aNb5H
@pocketsanta2
10 ай бұрын
its working now thanks @@Stevesteacher
@pocketsanta2
10 ай бұрын
how do I run these codes @@Stevesteacher
Did Does not work when I type Lua53 it says "'lua53' is not recognized as an internal or external command, operable program or batch file." I Use Lua 5.1.5 and I am on window 11
@Stevesteacher
10 ай бұрын
It is possible that Lua was not correctly installed and needs to be installed again
@TheNewCrusade
10 ай бұрын
@@Stevesteacher I Used the wrong version thanks for telling me. Have a nice day!
do you still recommend 5.3.6
@Stevesteacher
3 ай бұрын
You can use any version you want, the tutorials themselves should still work with any new Lua version ;)
great!
I'm gonna rewrite what I've said because it was kinda confusing, my problem was near the end, when he tried to open the power shell, and showed if it doesn't worked, you need to open the prompt and then do the "cd" redirecting it, but still when I did that, it didn't worked, so to solve my problem it needed to remove the ".txt" from the file to become the other type of file that I don't know. 1. "Show hidden files" 2. Enable "Developer mode" 3. "Change settings to show file extensions" 4. disable "Hide extensions for known files types" (old explanation) Hooolly shit, so to someone that is looking for kinda of the same problem, .txt , the problem that I was having, was because when I created a text file, It always would come as a .txt file, but in the video you can see that he removes the ".txt" and it becomes another type of archive kinda of, so to solve this I activated the Developer mode and change the settings to show file extesions and not hide them, so I could remove them too.
@smartomarplustax
Жыл бұрын
Thanks bro!
I am so sorry, but since I'm on mac, which makes everything muuch harder, I don't really get it. Could you SIMPLIFY it for me please?
@Stevesteacher
3 ай бұрын
You can install Lua using Homebrew 1. First install Homebrew brew.sh/ (will take a while) 2. Reboot 3. Install Lua (open your terminal) "brew install lua" 4. Have fun ;)
For some reason it says syntax error near "am" at 7:50 for some reason Pls help !!!
@Stevesteacher
2 жыл бұрын
You'll need to send the whole error otherwise I don't know what is going on :(
@boxloid
2 жыл бұрын
here is the error : lua53: main.lua:1: syntax error near 'am' i have checked but itis same as i am cool
@Stevesteacher
2 жыл бұрын
@@boxloid You did remember to use quotes (either single ' or double "), right?
@boxloid
2 жыл бұрын
@@Stevesteacher Oooooohhhhhh thanks I was forgetting that Thanks a lot sir
dude ur cool
jeez, i wasted an hour trying to find how to install lua.. Why did they make it so complicated and hide the simplle option..? Thanks man...
lua54: cannot open main.lua: No such file or directory ??
@Stevesteacher
Жыл бұрын
You are not in the same folder as your main.lua file ;)
Can you help me with fixing that error lua53: main.lua:1: unexpected symbol near ''
@Stevesteacher
2 жыл бұрын
Could you explain where this happened? Could you also share what is inside your main.lua file?
@wed1548
2 жыл бұрын
@@Stevesteacher it happened when i did the thing with cmd when i type lua53 it is normal but when i try lua53 main.lua it gives me the error in my main lua is print ("i am cool")
@Stevesteacher
2 жыл бұрын
@@wed1548 That is weird, almost sounds like one of the characters in your file is not allowed, delete everything in the lua file and paste this: print("i am cool")
@wed1548
2 жыл бұрын
@@Stevesteacher i will try it
@wed1548
2 жыл бұрын
@@Stevesteacher it gives me the same error if you want i can screenshare you in discord
What do I do if I dont have WINRAR
@Stevesteacher
11 ай бұрын
You can download and install it Or You can just use Windows inbuilt zip extractor
i cant cahnge the txt cuz its not there!
@rust_chad2467
2 жыл бұрын
the type of file is txt but i cant change it
whenever i try to run a file it says syntax error near "Lua"
@Stevesteacher
Жыл бұрын
What code do you have in your file?
@snapxd1
Жыл бұрын
@@Stevesteacher my issue was that i was opening lua and i couldnt run any command but i fixed it
8 minute video which took me 6 hours to finish😅great help tho
is it worth learning lua in 2022?? i am new and i dont know much about programming and i was thinking to learn lua as my first programing language
@Stevesteacher
2 жыл бұрын
As your first programming language, yes! Lua is a great first programming language because of how easy it is to learn Not only that, but if you want to code mods for certain games, then Lua is the way to go, same with if you want to develop on Roblox, Lua it is! And if you ever decide to learn C or C++, you can easily use Lua with both of those languages ;)
@abhishekamoli1586
2 жыл бұрын
@@Stevesteacher thanks for replying sir. Can you tell me types of things in which lua is used
@LuaExplained
2 жыл бұрын
@@abhishekamoli1586 You can use it to create Roblox games on Roblox Studio.
@abhishekamoli1586
2 жыл бұрын
@@LuaExplained any other use?
@sleepingzzs976
2 жыл бұрын
@@abhishekamoli1586 lua is mostly used by game devs
and where to run lua for MTA (GTA sa)
I followed the instructions and am now at a stand still, I am new to scripting and understanding this. My issue is when I type “lua53 main.lua” it says cannot open main.lua: no such file or directory. I have no clue what a directory is to solve this issue could someone please explain what a directory is and how I can solve my issue?
@Stevesteacher
2 жыл бұрын
Start over and make sure to watch the entire video, seems like you either failed to add Lua to your PATH variable, failed to install Lua or installed a different Lua version
@soulk111s
2 жыл бұрын
what fixed it for me was adding txt to the end of the file
@ishisehgal1692
2 жыл бұрын
try typing main.lua.txt after lua53 instead of main.lua, it worked for me
cout
my text files are not turning into a lua file after being renamed
@Stevesteacher
6 ай бұрын
Make sure you have "Show file extensions" enabled in your file explorer OR Rename the file from inside your text/code editor
@leshunhacato3174
6 ай бұрын
@@Stevesteacher thank you teach!
Worked for me!
W tutorial
спасибо =)
The jokes made this video legendary👍
Not working! I typed "cls" and it didn't work, neither did "clear"
@Stevesteacher
Жыл бұрын
Hello :) Could you please tell me what error messages you got? And did you just get these issues using those two commands, or did the other commands also not work?
@btlplumbing4728
Жыл бұрын
@@Stevesteacher I was trying to do the doors entity spawner exploit for roblox. Me and my dad were trying the three .lua things we could find in the directory of it and all there was was functions.lua, directory.lua, and ui.lua. None of them worked. We downloaded lua5.4 and lua5.3.6 and they don't work. It said the main chunk didnt load or something and (global 'game') i think.
It keeps saying the file name directory name or volume label syntax is incorrect
@Stevesteacher
2 жыл бұрын
Hmmm, at what point is it saying this?
@harveyleaves6662
2 жыл бұрын
@@Stevesteacher the last step the powershell I also tried the command prompt both said the same thing
@Stevesteacher
2 жыл бұрын
@@harveyleaves6662 After you installed Lua, did you test it to make sure you can use it (5:35), and did it work? If it did work, make double sure that you are inside of the folder that the .lua file is in (C:\Users\YourUsername\WhereverYouSavedTheFile), you can check if the Lua file is in that folder by typing "dir", if you see the .lua file, then you're in the correct folder, if not, make sure to "cd" (7:27) to the folder where you have the .lua file
@Stevesteacher
2 жыл бұрын
@@harveyleaves6662 Also, make sure the folder you are in has a safe name (no special characters), this video might help you out: kzread.info/dash/bejne/eZ6AlLGAg6-fqaw.html
@harveyleaves6662
2 жыл бұрын
@@Stevesteacher I just tried now it doesn’t even work at the 5:46 step