Convert py to exe - from code to software
HTML-код
- Опубликовано: 19 июн 2024
- In this quick tutorial you will learn how to convert Python files to fully functional Executable Programs!
We will use Auto-Py-To-Exe for to do this and ConvertICO.com to generate an icon for our Program.
From now on - you can turn all your Python apps into desktop software in 5 minutes!
🛑 NEWER AND BETTER VERSION OF THIS TUTORIAL IS NOW AVAILABLE! 🛑
-----------------------------------------------------------------
⭐ From Python App to Real Software:
• Convert GUI App to Rea...
This one is using Pyinstaller + InnoSetup and results in a 😱 SINGLE SETUP FILE 😱 which anyone can easily download and install on their computer (including your grandma! 😉)
-----------------------------------------------------------------
Did you like my Trivia Game? 🤩
Want to learn how to create it step by step?
⭐ Create a Python Trivia App with PyQt5 - PART 1 ⭐
• Create GUI App with Py...
⭐ Create a Python Trivia App with PyQt5 - PART 2 ⭐
• Open Trivia Database f...
⭐ Download my Trivia Game from Github ⭐
github.com/MariyaSha/TriviaGame
🐍 INSTALL PYTHON 🐍
• Install Python with An...
************************************************
If you found this video helpful - please like, comment, subscribe and share it with your friends! 😀
If you have any questions or if anything fails in the conversion of your app - please let me know in the comments below!
************************************************
convert png images to icons:
convertico.com/
read more about auto-py-to-exe:
pypi.org/project/auto-py-to-exe/
************************************************
TIME STAMPS
************************************************
00:00 - intro
00:27 - install auto py to exe
00:46 - select main py file
00:56 - one directory vs one file
01:31 - console based vs window based
01:55 - create and set icon
03:05 - additional files
03:38 - advanced section use
04:02 - select output folder
04:13 - convert py to exe
04:39 - play computer science Trivia
05:28 - thanks for watching! ♥
#python #pythonapp #pythongui #pytoexe #convertpython #convertpytoexe #codetoprogram #guiicon #gui #graphicuserinterface Наука
Did everything right. Why is it not working? :(
'auto-py-to-exe' is not recognized as an internal or external command,
operable program or batch file.
Hi Maksym 😊
Let me know if I got you right - you were able to install 'auto-py-to-exe' and after it showed you it's installed in the terminal you typed 'auto-py-to-exe' and then it presented you with that error?
Troubleshooting suggestions:
- Do you have Python 3.4 or above?
- Did you by any chance install it in one working environment and then tried to access it from another environment? or simply from the root?
- Try uninstalling it and then installing it again
- Try accessing it manually, here's how your path will look like:
C:\Users\Mariya\anaconda3\Scripts\auto-py-to-exe.exe
Where you'll need to replace "Mariya" with your own username 😊
Good luck, and please let me know if one of these suggestions worked! 😀
I had the same exact problem,
I am using python 3.9 so that shouldn't be an issue and I tried to access it manually, but for some reason, I couldn't find the exe file. What worked for me was once I installed it, I noticed that it gave the file directory for all of the files of auto-py-to-exe so I just did a control-f search (in the terminal after installation) for auto-py-to-exe.exe and copied the file directory that it gave and pasted it in file explorer and it worked perfectly. Probably not the way to fix the problem but it helps to get around the problem.
I should also mention that I just graduated High School and have only been programming for a few months as a hobby, and I don't have much experience.
@@notramwanule1069 well, if I can run the executable file, then it clearly installed correctly, probably just in the wrong place
@@PythonSimplified ts not working the appliction main.exe file just blinked in my window screen and gone. i am using kivy resources and used autopytoexe.exe to convert the .py to .exe file. How can we make it standalone.Pls help :(
@@redthunder6183 *Solution* :
Hi there, I got the same problem and i noticed that when i installed auto-py-to-exe it gave me a warning:
WARNING: The scripts auto-py-to-exe.exe and autopytoexe.exe are installed in
'C:\Users\ARHYA\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
So basically you need to add this location in your PATH variable of your system.
To do this:
1. Find this link when u install it or you can get this link alternatively by running these lines in your python IDLE.
'import os' then 'import sys' then 'print(os.path.dirname(sys.executable)+'\\Scripts\\')' then copy the output which is the location that u need to add in the PATH variable.
2. Press windows key n type 'system environment', open the setting named 'Edit the system environment variables'.
3. Press the option labeled 'Environment Variables' .
4. Find 'Path' under system variables and double click on it.
5. Press 'New' and paste the the location which we copied. Make sure to press 'OK' to save the changes.
6. Open a new command prompt and try 'auto-py-to-exe' (Make sure u have it installed before running :) ).
Now everything should work fine :P. (Note this kind of problem arises when u dont check the box which says 'Add python to PATH' when installing python. )
I hope this works for all of you.
Best of luck :)
This is something that should be taught in intro to programming courses because more people would start to make their own tools
I definitely agree! The whole purpose of my channel is to inspire lovely developers to create their own projects! 😊
This is the best way to learn, practice and get better and better and what we do. I am a thousand times more confident in my programming skills since I stated building my own projects, even though I still have so much to learn! 😀
Programming courses are great, but sometimes they limit our imagination and creativity. I prefer the trial and error way 😉
This is definitely not.
python files designed to be executed with an interpreter and exe files are created with compilers.
This is a cool but not an out of the box solution, so teaching this in a programming intro course will only cause confusion to someone who is new to programming.
@@ovs_cosplay If you have written a python project and you want to deploy it for other people to use, what's the best deployment method?
Exe is such a standard, if you want other people to use your code.
Also, if you want to protect and obfuscate your code, so that it cannot be reverse engineered, will it be safe once converted to exe? Is there a way to obfuscate code if you're deploying on pypi for example?
So…. This video just stumbled on my feed and decided to check it out. After so long looking into how to do this (learning Python on my own) this is by far the easiest way I’ve seen to convert to .exe. Thank you so much!
I love your content. I'm a CS student who mainly works with Java, but I want to get into machine learning. Your Python vids will help a lot.
I literally only learned python to help with my old job. Lot of data we dealt with, ended up falling in love with programming and now am about to start applying for junior engineer jobs.
ew java
Ew
Thank you! Was searching for this so long.
Wow! This is what I am looking for! Thanks for your video and all the detailed instructions.😃
Will come super handy for my garage project, thank you for the videos, helping me out a lot recently! :)
Thank you for the lovely feedback Khealim ! I'm always happy to help! 😁😁😁
Yooo these tutorials are short and straight to the point. This channel is going places! 💪
One of the best videos I have ever seen before about converting py to exe. Thank you so much!!!
i've been looking for something like this for a while. thank you.
You're welcome Engin, glad you found it useful! :)
This is the channel I never knew I needed !!
Becase you didn't :harold:
Missed the live chat but in this case you've left no questions! As always, fantastic content.
Tbh, I like more of these type of videos because they're short, concise and they get to the point.
Thank you for this videos!. They really helped me a lot this few weeks, i made some decent projects to my university thanks to your pyqt5 tutorials!. Thank so much :D
Yeeeeey, I'm so happy to help Jysús! Especially with university stuff!!! 😁😁😁
I know it could sometimes be overwhelming and having the right advice at the right moment is absolutely crucial! 😊
Thank you for the incredible feedback!
I was hoping you’d do this one!! You are so awesome. 👏😲
Thank you so much Josh! This tutorial was highly requested so I had no where to run! hahaha 😁
The single most important question in my life and yet I never asked the correct question. Until RUclips recommended the video. Thanks a lot Mariya.
I was searching for hours and this video worked perfectly!!
You may also convert the exe to an installer (using 'inno setup')
Better with WinRAR.
Thank you Mariya I did this eventually, although you made the hard part look really easy. To get from 0.30 to 0.45 took me several hours. The things you did would not work in command prompt, you have to get anaconda, then anaconda navigator, then from navigator you can run a terminal in main virtual environment where you can install auto-py-to-exe, then with this app you can finally convert .py to .exe
you've succesfully complicated everything
@@ellyothim355 Perhaps your setup is different to mine, just sharing my experience :) thanks for fantastic explainer though it did really help even if I couldn’t do it your way
Thanks for your effort. It's really amazing and simple way.
It's a pleasure to be one of your channel members.
Thank you, this helped a lot, I was stucked in my one file handling program because I was doing One file mode instead of One directory mode, now it is solved.
Thank you.
Que isso kkkk
it wasn't as complicated as i thought it would be. Thank you for sharing this!!
You're absolutely welcome benet tsif! it was a highly requested video, and judging by all the GUI projects we created on this channel - I should have done it much earlier! 😀
thankfully the package you install does all the heavy lifting which is why it isn't complicated. Kinda how we can say "oh driving isnt as complicated as I thought", but really the engine and how everything works is abstracted away behind a steering wheel and some buttons. But thats the power of python: there probably exists a library for what you want to do. But you can also implement stuff from scratch if that's what you want to do too - I find that it personally helps me get a deeper understanding of concepts
Thank you for your videos, your content is not the same as content from other channels. And it’s amazing!
I don’t know English well, and I’m even worse at programming, but your videos are very useful and informative for me, I think it’s worth trying to start learning programming with Python. And thanks a lot for your work!
AWESOMEEE!! hahaha. Keep making sick videos like this, we appreciate it so much!. Have a wonderful day.
Thank you, thank you, thank you! 😀
What did you think about auto-py-to-exe compared to the pyinstaller way??
@@PythonSimplified It's fancier, I like it!.
@@ZurioSi Fancy is great! hahaha 😁
@@PythonSimplified feels like software designer and got a chance to spread our projects easily
Thank you for your tutorials! They are awesome. Would you be so kind to show how to compile a SETUP file for the app?
I sure will! 😊 thank you so much for suggesting and for your lovely feedback! 😁
Awesome. Really helping me get back into programming.
Stunning as usual.
Thanks for the very helpful vid.
This video made my day! You are a great help! I just finished my 1st project. Thank you! New subscriber here.
This video is a gem for a beginner. Thank you so much
hahaha you are just adorable
thanks a lot
Blessings
Thank you so much Luis! Blessings back 😇
Спасибо, Машка)
I will go home today after work to build a my first project. The code is mostly complete since ive been learning the past 2 weeks how to program simple stuff. If this app works. You have a new follower.
very helpful videos, thank you!
I'm clicking like before watching the tutorial. Good job Mariya!
This isn't really "converting" it's bundling, it's just wrapping the Python + the python runtime and your files into an executable.
If you wanted to truly convert Python to native code there is one project called Nukita, that does whole program source file to source file conversation. This however takes a huge amount of time because it has to convert and compile everything including all your library dependencies.
Does it turn the source code into bytecode so it’s unreadable?
@@AlexJaeger716 it turns it into machine code same as when you compile a C program into a native executable
@@Anhar001 Thanks for the response! So people can't decompile it?
@@AlexJaeger716 native code can be decompiled but often times the symbols will be striped as well as names mangled and that's not including a lot of compiler optimisation, the decompiled output is nothing like the origin source code.
Anyway obfuscation isn't the purpose of native compilation, the purpose is speed and not needed runtime dependencies
@@Anhar001 ah I see, so pretty much using something like nukita is enough to protect my code? what about using something like pyinstaller? Would that offer the same level of protection?
как я успел пропустить эти 8 минут)
a voobshe to 5:55 minut! 😁 hahaha
skoro budut "live lessons" tak 4to budit trudneie propustit 😉
@@PythonSimplified Do you speak Russian? Or translator?
@@stepanfedoseev2807 в чем тогда прикол писать транслитом, если переводчик переводит? Так пишуть только потому, что нет на клаве русской раскладки. А так ответ очевиден
@@Lord__Of__Darkness У нее характерный акцент ...
@@stepanfedoseev2807 стефан цвейг !
Awesome, I like the front end for the py to exe, was not aware it existed. Thanks for sharing 👍
Thank you Tobs! I'm a huge fan of interfaces as opposed to consoles so I was a 100% sold on Auto-py-to-exe from the get go! 😃
Nicely done -- good information presented in a concise and enjoyable format. (ex-CS prof)
SUPER HELPFUL
pyinstaller was getting on my nerves but this is better THANK YOU
Great! I just started to learn programming half a year ago!
Woh, PyToExe has come a long way! I remember using it 10 years ago, the interface was a lot complex to use.
Simple, fluent and nice tutorial, thumbs UP
Worked like a charm! Thanks so much!
Awesome thanks!! super easy and worked first try 😉
It helped me alot. I was searching youtube for this topic since 19 days but finally I got this video. Thanks
Love from india..❤️❤️
Yey! I'm so I happy I could help! 😁😁
Greetings from Canada! 😊
Thanks for this video, I wasn't aware of this process with auto-py-to-exe.
Great video. i love how you go step by step. Keep up the great videos.
Thanks a lot, Mariya! It helped me a lot. Everything resulted as expected. Keep your work up. Greetings from Peru. 🤗
To the point!! Worked well. Thanks.
This video was so well made that I watched the whole thing and I do t even need to convert my .py files
You kept the video short and it was very good regardless. You are amazing.
thank u very much. you teach python very well and explains everything in a cool manner . i am now a subscriber
Thanks for the vid, worked flawlessly!
Its been a year since you made this and i am just starting this python. You probably created your own planet by now! great lesson :)
hahahaha still working on it! for now Earth will do 🤣🤣🤣
Best of luck on your exciting new journey! Python is an extraordinary language, you gonna love it! 😁
She's actually from Pythos! She's a queen there. :)
Thank you very much. Helped alot :) good video!
Hi Mariya! Where are you from? I'm an amateur Python programmer and GNU/Linux user from Argentina. I just have suscribed to your channel cause I wanna improve my english language skills, listenning to stuffs I like. I feel you accent and pronunciation very pleasent and easy to understund, besides your explanations are pretty clear , direct to the point and no waste of time.
I wanna do a little correction about --one-file and --one-directorty options. The first one is about generate only one and big excecutable file with all included, and the second one is about generate a little executable file plus a directory with other files like dll shared libraries and other binary objects.
I wish you a good new year and I hope your channel grow up soon.
thank you for the easy tutorial for python to exe!
I've always felt tempted to use py2exe but the large file sizes of the output let me kind of disappointed.
Someone suggested a video on configuring setup.py, but I believe that's just an intro to something bigger that could be covered in a small series of videos, wich is creating, building and publishing python packages. Something I would love to watch on your channel.
Keep up the good work!
thanks so much for the tutorial I hope you reach 100k as soon as possible
Well, I used to work with pyInstaller but this time I said to myself let's give this a shot. turns out this library is using pyInstaller too! but because it's GUI-based I will use this from now on. thanks for the step-by-step introduction.
Thank you so much for your sharing!
It's really helpful for me
Ty fo this tutorial!! got my app runnin on server :D
GREAT VIDEO. THANKS. Your tip worked. Worked perfectly.
thank you for your effort
learned a lot from you
keep going please
still has much to learn
Very helpful video . Thanks a lot Mariya 👍
Learn a lot watching your videos. ❤️ from Srilanka
thanks a lot, this was exactly what I needed !!
thanks only ths worked for me out of the many we have..
an helpful video...
Thank you mam for this simple tutorial, way to go!
You're my favorite coding youtuber :)
Thanks a lot Madam, I am 12 years old and I made a Clock App, and this was the perfect tutorial for me, please keep making more !
OMG you saved my ass i have to deliver my project till Monday. I tried to use pyinstaller before but it doesnt worked now it is working with your Auto-Py-To-Exe. Thanks
Hi, i am from Brazil. I am a computer engenier student and i am watching your videos.
Thanks python simplified I love you, you're maybe 90% programmer, but you're also a 100% amazing
I love you, Lady!
This video is still great!
You're awesome, thanks for the video!
You explain very clearly and your presentation is very engaging :-). Well done
Great stuff ! thx ! Just what I needed . Subscribed !
תודה רבה נועם, שמחה לשמוע! 😀
Welcome aboard! 😁
Thanks boss. i never knew something like this existed
I really like your accent and the way you teach ^_^ Thanks for the brilliant and informative videos :)
Very exciting! Thank you!
Thanks a lot, you really explains in joy ❤
Very very thank you your video was so helpful all the best for the next video 👍
I am seriously addicted to your videos 😵😵😵🙃🤗
Thank you it was very useful keep doing more videos like this.
Thank you so much! ❤ I love your channel.
Thank you Ezequiel! I'm glad you like my tutorials! 😊
i just cant thank you enough. this explanation is real ez. this channel is sooo under-rated. RUclips must recommend your videos rather than dumb minecraft and attitude statuses.
That’s so neat!
Actually gonna try this
Thank you so much! 😁
good luck with the conversion and have fun! 😊
Thanks sis... for sharing your valuable knowledge.
It help me in project development.
I love python. Thanks for this awesome video. This will help me to make my python projects to become available on windows as well as Linux.
Yey! I'm always happy to help! 😁
You're absolutely welcome!
You are a great teacher Mariya!
I love you for sharing these vidoes!
I almost fell in love ^^ I had to watch it 3 times because I got lost in your sweet smile xD keep making videos !❤
it was also very helpful
your gain a new subscriber, nice content and great attitude
i dont generally use python but this is good information if i ever want to play around with it again.
Really good content, I actually needed a way to convert a .py into an .exe at work....thanks for the vid.
That was quite easy . Thank you.😀
Python is fun thanks to you. ❤ You are a good teacher 😍
Thank you for this tutorial!