btw: i like the design of that auto-py-to-exe-GUI. How was that created?
@PyTutorials3 ай бұрын
I used github.com/python-eel/Eel to get a webview that can interact with Python and then just HTML+CSS+JavaScript in that
@digitalmachine01013 ай бұрын
Good information
@SAWYERSCTA3 ай бұрын
Hello, am I have a problem where the keys don't work, S is to start it right? And I'm unsure if I'm suppose to keep with Listener(on_press=on_press) as listener: because I tried it with the code and it doesn't open the program and I got a rid of the keys don't.
@PyTutorials3 ай бұрын
Did you use the example from the post linked in the description? Also if you add print statements in your code, you can identify what is/isn't happening.
@B34543fc4 ай бұрын
If I want to change the start_stop_key from a character on the keyboard, to say, the middle mouse button, how do I do that? start_stop_key = KeyCode(char = Button.middle) start_stop_key = KeyCode(char=ClickMouse(delay, Button.middle)) start_stop_key = ClickMouse(delay, Button.middle) I've tried these method of doing it but they don't work, how do I do it?
@PyTutorials4 ай бұрын
You can't listen to the keyboard for a mouse event - pynput offers two separate mechanisms for detecting mouse clicks and key presses separately. You can detect mouse events using this tutorial: nitratine.net/blog/post/how-to-get-mouse-clicks-with-python/
@JoséNicolasCumacoPesca4 ай бұрын
Buenas tardes. Tengo una pregunta, hay alguna forma de poder ver y ocultar la consola de CMD? Quiero que el usuario no tenga acceso a ella, pero en caso de que necesite revisar algun fallo o demas, quiero poder activarla sin necesidad de volver a crear el ejecutable, y poder ocultarla nuevamente. Gracias
@PyTutorials4 ай бұрын
There isn't much of an option to hide it from the start and then potentially open it again later on. My recommendation would be to package as no console and then put your output in a log file.
@wass774 ай бұрын
the code works only inside VS code but when i change to google chrome the code doesnt work what could be the issue?
@PyTutorials4 ай бұрын
Doesn't work how? They mouse clicks are not registered? Do they work on the built-in Windows calculator?
@wass774 ай бұрын
@@PyTutorials the script stops mid way and doesn't finish the rest of it for example i want to automate a task and when i change to the target window using Alt-tab the code doesn't work on the window i focused on but when i run the code in VS code and don't change window the code works fine but only inside VS code window
@PyTutorials4 ай бұрын
If you run your script from the command line, does it make a difference? Only running when you're focused on vs code is hard to believe (not to be rude).
@wass774 ай бұрын
@@PyTutorials you are not rude at all i totally agree with you, my mind is also in confusion, and i'm so sorry for confusing you with my problem and apologies i'm replying to you from two videos didn't know the videos are from the same channel
@wass774 ай бұрын
@@PyTutorials hello again i just found out that the script works completely fine on my browser and on MS paint and notepad but it stops working on an mmo game i'm playing i dont know why i didnt try the script on different environment like a browser or another utility like notepad or ms paint the problem is only on an mmo game i'm playing i dont know why to be honest, thank you very much and i really apologies for spamming your inbox and without me doing a further investigation, thank you very much for your time and wish you all the best. <3
@wass774 ай бұрын
hello the script works fine inside my VS code but when i change to another window during the "time.sleep" the script just stops and doesn't continue the rest of the code, what could be the problem?
@PyTutorials4 ай бұрын
How do you know the "script just stops"? As in it throws an error? If not, it is probably still running the commands.
@wass774 ай бұрын
@@PyTutorials doesn't throw any error it seems like the code got paused until i change back to VS code with Alt-Tab, thank you very much for the reply also apologies i'm new to programming and cant articulate my self with the right coding terms
@PyTutorials4 ай бұрын
That seems very odd - I can't see how the program could pause itself. Have you tried typing into notepad?
@wass774 ай бұрын
@@PyTutorials hello again thank you very much fro the reply i have not tried typing in notepad i will do it and i will let you know, since it's an odd thing i think i'm the only one having this issue judging from the other comments also sorry i didn't inform you that i'm using windows 7 and my VS code is not updated, i think that could be the problem
@yaz_trending_videos5 ай бұрын
This is an excellent . Could you please clarify how to pass parameters as arguments for file path inputs and outputs?
@PyTutorials4 ай бұрын
Not quite sure what you're asking here sorry - could you elaborate?
@خالدباشميل-ب9و5 ай бұрын
Warning: Installing shim for bottle import redirects (using Python=3.12.3 and bottle=0.12.25)
@PyTutorials5 ай бұрын
Yes? This is just a warning
@خالدباشميل-ب9و5 ай бұрын
@@PyTutorials put the file exe not operate why !
@PyTutorials5 ай бұрын
Have you followed the debugging section in the help post? When you followed it, what did you find?
@خالدباشميل-ب9و5 ай бұрын
@@PyTutorials please send me email and I will send you my file py and exe
@PyTutorials4 ай бұрын
I do not do that sorry - too many people ask this from me and I do not have enough time for everyone. Please comment here and I can help. You need to put some effort in and follow the debugging steps I provide so I can help you.
@widerkollektor53965 ай бұрын
Hi i was wondering if I can do a hotkey mapping on my keyboard to play certain mobile FPS games? This video does help quite a bit but I wonder if there are tutorials on how to set key press positions (e.g. xyz of the screen) and how to import the scripts onto IOS ipad?
@PyTutorials5 ай бұрын
These are hotkeys for a PC. Mobile will be very different.
@lapispheonix75695 ай бұрын
Commenting to see if the creator still responds to comments 6 years later
@PyTutorials5 ай бұрын
I dooooooo 😄
@lapispheonix75695 ай бұрын
@@PyTutorials wow! the dedication is unreal
@JoséNicolasCumacoPesca5 ай бұрын
Hello, I have a question, if I do any change in my main program or any of the files that I import, need I compile again the project, or can I copy-paste the change in any file that generate? Thanks
@PyTutorials5 ай бұрын
I would recommend just fully re-run the tool again - copy-pasting an updated file isn't a very easy way
@rubenbraga91435 ай бұрын
how do i change the keycode button to my side mouse buttons?
@PyTutorials5 ай бұрын
I'm not sure what the keycode would be, but you can find this out by watching my "Python Keylogger" video ( kzbin.info/www/bejne/rmmqk4qqapuHors ). Using this, you can figure out what the keycode is and then look at my video "Simulate Key Presses in Python" ( kzbin.info/www/bejne/eoXRq2utdpuqptk ) to see how to simulate the keypress. The above assumes that it will register as a keypress, if it registers as a mouse click, you can use my video "How to Get Mouse Clicks in Python" ( kzbin.info/www/bejne/oXvWmad5m9Z2qbs ) to see what the side mouse button actually calls.
@anamaly61526 ай бұрын
Thanks! How do i make it type enter?
@PyTutorials6 ай бұрын
The link in the description gives this - it's Key.enter
@SkyTheGuyLmao6 ай бұрын
Next video when?
@hamzazad52586 ай бұрын
thank you!
@cmlosaria6 ай бұрын
Hello, thanks so much for the tool you created. This is very handy and useful..I am playing around with it and this video helps a lot May I ask a question? So I have this folder location with multiple python scipts, around 5 script, and some folders such as assets etc. I tested everything on VScode and it's working as it should. Now, I want to package them all under one executable file so I am able to share it. I have an entry point script which is a GUI for users, which is basically a welcome screen with a next button (guiWelcome.py). This is the code generated.. pyinstaller --noconfirm --onefile --windowed --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/assets;assets/" --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/outputs;outputs/" --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/streetPredictive;streetPredictive/" --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/tmp;tmp/" --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/adaBoostRegressor.py;." --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/gradBoostRegressor.py;." --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/guiConfigure.py;." --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/guiFinish.py;." --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/main.py;." --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/mapPlots.py;." --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/network.py;." --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/randForestRegressor.py;." --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/streetLandPricePredictive.py;." --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/streetProc.py;." --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/wardLandPricePredictive.py;." --add-data "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/wardProc.py;." "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/guiWelcome.py" When I run the executable generated, it shows the guiWelcome.py. When I click next button, I expect it to call the guiConfigure.py "from within" the executable file, but unfortunately it still refers to the guiConfigure.py in my folder directory..(I tested, if I rename this file, the Next button causes the window to close or error) Not sure what I am doing wrong...I tried changing the path to call the guiConfigure script when I press the Next button, using an absolute and relative path. Absolute path works but it still refers to the script stored on my machine as I explained above. Changing it to relative path does not work. Example below of relative vs, absolute path # Launch guiConfigure.py subprocess.Popen(["python", "guiConfigure.py", str(x_pos), str(y_pos)]) #subprocess.Popen(["python", "D:/Projects/RealAI/From Nam/charlie_test/myPyRoadHCMC/guiConfigure.py", str(x_pos), str(y_pos)]) I though the idea to package all under one executable files is it's supposed to be independent already and can be passed around..I hope I am making sense..
@PyTutorials6 ай бұрын
I recommend importing your other Python scripts into your main script rather than calling them using subprocess.Popen. Since the Python file reference is just a string - the tool cannot see it needs to be packaged. If it were packaged, this would not work on another machine without Python because you are trying to start the script using something equivalent to the command line - the Python distribution in the output package will not be used.
@lord.farquaad116 ай бұрын
Hey just wanted to say thank you for this. Around 6 yrs ago, I was a junior software engineer working on a tool for our main app, this tutorial saved me from hours to days of headache. Thank you so much! Keep up the good work wherever you are.
@PyTutorials6 ай бұрын
Thank you for this wholesome comment. It warmed my heart 😃
@stephennirmal6 ай бұрын
, in <module> from ._cext import ( ImportError: DLL load failed while importing _cext: The specified module could not be found. what should i do
@PyTutorials6 ай бұрын
Do you get this when using matplotlib? I would recommend adding matplotlib to --collect-all in the advanced tab
@stephennirmal6 ай бұрын
ImportError: DLL load failed while importing _cext: The specified module could not be found. whati should do
@hoffmanshaven6 ай бұрын
This is very frustrating because no matter what I do I get icon file not defined error and app will not run.
@PyTutorials6 ай бұрын
What is the exact error you are seeing? Are you referencing the icon correctly?
@hoffmanshaven6 ай бұрын
@@PyTutorials So I am now able to make the application I built work but I am trying to make it a portable exe with pyinstaller. I am referencing the icon for the main window and also the same icon for the application. As long as I copy the icon along with the app it works but I am not able to imbed the icon where it is portable along with the app. Do you know of a way to do this? If I don't copy the icon separately I get a pop up error stating the icon file is undefined and the app will not run. Thank you for your reply and attention.
@PyTutorials6 ай бұрын
There is an option to add non-Python files using --add-data, docs here: pyinstaller.org/en/stable/usage.html#cmdoption-add-data I recommend using github.com/brentvollebregt/auto-py-to-exe - it makes the process a bit smoother and you can add non-Python files in the "Additional Files" section.
@hoffmanshaven6 ай бұрын
@@PyTutorials Thank you, I appreciate your response. Too bad I am not able to make this work. I am not able to make any icons or pictures in any application and after several days and many rabbit holes I gave up. I wrote two different versions. One I can run from VSCode and it works fine. The other I just all text based with the default feather icon I can convert to an exe and it runs without error. I know it's something I am doing wrong but I only have so much time to put to it. Without having someone who knows how to do it looking over my shoulder oh well too bad. I might try again later when I am refreshed. There are only so many forum posts and youtube videos. I really can't use anything on stack overflow it's all over my head.
@cirql_nvm6 ай бұрын
thx so much I'm trying to do that 1 month <3
@philosophicaall7 ай бұрын
can I do the same thing if im using visual studio code and the python extension for it?
@PyTutorials6 ай бұрын
Yep!
@philosophicaall6 ай бұрын
@@PyTutorials thank you, I just realized that if I do everything for the python folder it will transfer over to the python extension
@JoséNicolasCumacoPesca7 ай бұрын
Buenos dias, tengo un inconveniente. Tengo una aplicación que tiene varias carpetas con archivos de python dentro, que utiliza para su funcionamiento. Cuando genero el ejecutable, funciona correctamente, pero si edito alguno de los archivos, el programa no toma esos cambios, como si los ignorara o algo quedara almacenado. Como puedo solucionar esto? Gracias
@PyTutorials7 ай бұрын
I describe this in the help post under "The Difference Between One Directory and One File": nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#the-difference-between-one-directory-and-one-file
@JoséNicolasCumacoPesca7 ай бұрын
@@PyTutorials Thanks. you're right. I have another question. When I create my exe, I use the option hide the console, and works, but when I execute my Exe, in the task manager I found a second stage process of my exe. If I create my exe with the console based option, the secons stage process not appear, but the cmd window doesn't close by itself. What could be the problem? Thanks
@PyTutorials7 ай бұрын
The second process will be the application host that unpacked the exe before running the internal exe (as if it was not packaged using onefile mode). In terms of the cmd window not closing by itself - it sounds like your application is still running.
@JoséNicolasCumacoPesca6 ай бұрын
@@PyTutorials Is there any additional configuration or parameter I can use to resolve this?
@PyTutorials6 ай бұрын
@@JoséNicolasCumacoPesca Does your script do this before converting it to an exe? Like when you double-click on the .py
@treebardgenealogysoftware25777 ай бұрын
The .exe I made for my big app works fine on my Windows 11 64-bit computer but won't open on my Windows 10 64-bit computer. I tried with auto-py-to-exe and then I tried running pyinstaller directly. Same either way, it works on the computer where it was made. I'm using Python 3.12.
@PyTutorials7 ай бұрын
When you followed the debugging steps in the help post, what is the error are you seeing?
@treebardgenealogysoftware25777 ай бұрын
@@PyTutorialsIt was my mistake. I had forgotten to move the whole app. I had just moved the parts made by auto-py-to-exe to test in a new location, but all the other folders were missing so it wouldn't run. You program worked perfectly. Thanks.
@Chavo19917 ай бұрын
my antivirus detected the exe as mAlware.
@PyTutorials7 ай бұрын
The help post (which is linked in the description and tool itself) discusses this situation: nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#my-antivirus-detected-the-exe-as-a-virus
@leesweeney2068 ай бұрын
Well I can confirm that this is spot on. Tried and tested on linux. Works exactly as you say. I had searched and tried other methods that gave all sorts of headaches. This was very simple, very straightforward and very helpful. Thank you so much 👍
@DS-me6kb8 ай бұрын
Hi, I am trying to install it from Ubuntu. I am inside the auto-py-to-exe directory. what do I need to do next in order to open the application? I am a newb, sorry
@DS-me6kb8 ай бұрын
When I enter auto-py-to-exe nothing happens and I just CTRL+C in the terminal..
@PyTutorials8 ай бұрын
Might be easier to use pip to install, follow the installation here: github.com/brentvollebregt/auto-py-to-exe?tab=readme-ov-file#installing-via-pypi pip install auto-py-to-exe auto-py-to-exe
@turigar8 ай бұрын
is there any way of using Fn keys with this? (Using F8 to run the code and F3 to stop it for example)
@PyTutorials8 ай бұрын
In the help post, the docs are linked showing all the keys you can use: pynput.readthedocs.io/en/latest/keyboard.html#pynput.keyboard.Key
@turigar8 ай бұрын
@@PyTutorials tysm bro
@agentpx8 ай бұрын
Thanks for this wonderful utility, I have a Main.py and other.py where main.py is dependent. The utility does not recurse or resolve the imports done in other.py. I am building a onefile project.
@PyTutorials8 ай бұрын
If you are using the "import" keyword to import them, then it should be able to find it.
@agentpx8 ай бұрын
@@PyTutorials yes i have imports, But I decided to copy paste external py's in a single file. I just wish not to do this in my next compile.
@PyTutorials8 ай бұрын
@@agentpx when you package main.py, is other.py right beside it?
@agentpx8 ай бұрын
@@PyTutorials yes, they are on the same directory.
@PyTutorials8 ай бұрын
When you package, is there any reference to other.py in the output logs?
@thereaper77978 ай бұрын
I am not sure if this is the right place to ask or not but I am having trouble getting my python script to work without the console. When I use the console it works perfectly but when I then convert it without the console my script glitches out a lot
@PyTutorials8 ай бұрын
Have you followed the debugging steps in the help post? Are you getting errors when following the steps?
@thereaper77978 ай бұрын
@@PyTutorials yea I followed the basic debugging steps. Originally my problem was that I was used to an IDE so my window closed immediately. After following the steps I added a while loop to my code to keep it going and this worked completely when I used the console but when I converted it without a console it started glitching out. My guess is it ran the code multiple multiple times over cause the screen kept flashing and then after a while I got an error saying there were over 2000 objects and it reached the limit (I’m using a graphics library in it) but I’m not sure why it only does this when I convert it without the console
@PyTutorials8 ай бұрын
@@thereaper7797 if you run your script with the Python executable, for example `/path/to/python/python.exe your_script.py` - does it work as expected? If so, if you instead run it with pythonw (no console), for example `/path/to/python/pythonw.exe your_script.py` - does it work as expected?
@thereaper77978 ай бұрын
@@PyTutorials I had to figure out how to do this but after doing that yes the script works when run with the pythons executable but not with the pythonw executable. That has the same issue. I managed to import time and sleep the program before it closes on pythonw and I’m the output it’s throwing the exception “Exception! App Stopped! See console for details” only there isn’t a console to see the details
@PyTutorials8 ай бұрын
If the script doesn't run properly when executing it with pythonw.exe, it will not work as a no-console application. Using pythonw.exe, you can identify the import that is the issue.
@manifestasisanubari8 ай бұрын
Hi! Do you have tutorials on PyQt QWebEngine for creating a web browser? I'm struggling to understand how downloads work and how to download files using the custom-made browser. Or is it just because most websites especially using Google don't accept unfamiliar browsers?
@GodisGracious1031Ministries8 ай бұрын
Hello! love the video, I wast able to get a error: no module called 'PIL'. Thanks :) God bless.
@PyTutorials8 ай бұрын
You are missing PIL - you can install this using `pip install Pillow`
@ggqqlive9 ай бұрын
How to make it in to Boolean like if "A" been press? nvm I just use the keyboard to get it done
@PyTutorials9 ай бұрын
Which piece are you trying to make a boolean? In your on_press, you could do something like `is_a_pressed = str(key) == 'a' or str(key) == 'A'` (untested, but gives the idea)
@ggqqlive9 ай бұрын
@@PyTutorials Yes and I just use the Keyboard Module to fix the issue: While True: keyboard.wait(‘space’) And thank for you helping.The video really helping me to understand.
@veruc_w9 ай бұрын
Hi there! I am doing something wrong... every py I converted and got win file, closes right after starting it. Somebody has this problem? Thanks
@PyTutorials9 ай бұрын
Have you followed the help post debugging steps? What error are you seeing when following the steps?
@Nordlys09 ай бұрын
Nice video. I have my project folder 3 .py files, and a picture file with a .pgn file in. project/ 1.py(is main file) 2.py 3.py project/ pictures/ 1.pgn So i've set the 1.py on top in Script location. Do i have to choose One Directory in this case? And add 2.py and 3.py, as Add Files, and add the pictures folder as Add Folder? Or is Additional Files only meant for non .py files? Do i have to place also the 1.pgn as Add Files in this case, cause it's included in the Add Folder normally? Thx in advance..
@PyTutorials9 ай бұрын
You can use both one directory and one file, just need to point the program at your 1.py since it's the main, the difference between the two is the output. You will need to add 1.pgn as an additional file.
@bracha1710 ай бұрын
Hi great stuff! would love your help... i have an app comprised of about 7 .py files, 1 db file and few images - and i want to wrap them all into 1 exe file. how should i go about it? thanks a lot!
@PyTutorials10 ай бұрын
Select your entrypoint .py script as the main file and make sure to add any non-Python files to the additional files section. If you are expecting the database to change and stay changed after every run, you will need to build to a single directory (if you absolutely need to package it - otherwise create it dynamically).
@davon_rolage11 ай бұрын
Thank you for such a useful and concise tutorial! Who could've thought that you can explain pynput's clicking and OOP incorporation in just under 5 minutes!
@PyTutorials11 ай бұрын
Glad it was helpful!
@grottemaster929311 ай бұрын
python 3.5 does not exist bruv
@PyTutorials11 ай бұрын
A simple search in Google, "python 3.5", will point you to www.python.org/downloads/release/python-350/ Python 3.5 does exist.
@Kloton11 ай бұрын
thanks you, finally i can find a good video that actually works, this is insane thx man have a great day
@e2k220 Жыл бұрын
ty xqcL
@thedarkknight7644 Жыл бұрын
You gained a subscriber ❤
@DontMansion Жыл бұрын
I wonder if billions of coders need py-to-exe- converter why python creators didn't add any default converter for many many years. I refuse to understand that.
@Soulfly262 Жыл бұрын
Hey, I've got a question. I installed python and pip shows no errors in console, but after i set the directory an want to install the requirements.txt it shows an error that, no such file or directory is in place. But i can see the requirements.txt in the folder. what can i do?
@PyTutorials Жыл бұрын
Is the current working directory in the terminal the same directory that contains the requirements.txt? You should not see it complain about requirements.txt not existing if you are in the correct directory.
@pratyushsrivastava3644 Жыл бұрын
Can we create this file in such a place in C drive that whenever the PC boots this script automatically executes
@PyTutorials Жыл бұрын
Yep, but I would recommend using a .bat file to call the script and that to the auto-start folder
@aive8z446 Жыл бұрын
Hey man, this is a great tool, for some reason it's not working for me to run it (I have disabled all anti-viruses and firewalls), and it just opens it up but gets stuck on initializing.
@PyTutorials Жыл бұрын
Are there any messages in the terminal you started auto-py-to-exe from or in the Chrome DevTools?
@lukas5238 Жыл бұрын
Try to reinstall the module
@vimakuma Жыл бұрын
I believe this is the best way to automate anything you want through mouse.
@BiplabDas-gt1fw Жыл бұрын
I have 3 different python code, I want to merge all & a single exe file
@PyTutorials Жыл бұрын
I talk about this in the help post linked in the description: nitratine.net/blog/post/issues-when-using-auto-py-to-exe/#how-do-i-convert-all-my-python-files