You mentioned at the end that if we want to create an .exe that works you recommend using cpp, c, c# or java. But isn’t java also an interpreted language? Great video!
If your program is slow to start, avoid using --onefile. This option bundles everything into one file, similar to a zip. Running it involves extracting everything to a temporary folder, which slows down startup. Without --onefile, there's no extraction, so it starts faster.
Good video, the problem I've found with PyInstaller though is the Windows Defender picks it up as a virus and deletes it! Most other AV progs are OK but it'd a bit of a problem!
Are these projects that you have done with in the last year only able to be done through the Professional Pycharm download, or can I practice and utilize these projects with the community download. Completely new to Programming, and all the software that comes with it.
Any PyCharm works fine, the only difference being that Pycharm Professional version has an extra array of features, but the Python is essentially the same, so you can write the same code in the Community edition and nothing will differ
I am trying to convert .py file to .exe . it creates the .exe file but it does not work while the .py file works. its a simple code where i import .csv file and and do some calculation and conditional formatting then try concert it. any suggestion or recommendation?
yes you can keep the .ico file in the same place where the python file is located or in a folder such as an images folder. if you put the .ico file in a folder called images then you would type in the command prompt: pyinstaller --onefile -i images/iconfilename.ico main.py
" It is not a cross-compiler - to make a Windows app you run PyInstaller on Windows - to make a Linux app you run it on Linux, etc " Any workaround this?
There is error, when you use option --onefile and made our application in exe.afer that we open that exe it will made a copy of our python script in temp folder.It is dangerous, means we share original python code to client.kindly solve this bug for --one file format.
when I run my exe on windows 7 I get this message: python exe api ms win core path dwwin.exe api-ms-win-core-version-l1-1-1.dll I used python 3.9 to create my project. can you please help me ? I installed the latest virtual c++ package on the win7 pc still no help.
I did , but It was a problem with cmd, I wrote pip install pyinstaller. But Cmd said : C:\Users\kingsman>pip install pyinstaller Fatal error in launcher: Unable to create process using '"c:\program files (x86)\python.exe" "C:\Program Files (x86)\Scripts\pip.exe" install pyinstaller'
After installing pyinstaller, and doing pyinstaller in cmd, i get the error: pyinstaller is not recognized as internal or external... How do i fix this?
please this is what I get. struct.error: unpack requires a buffer of 16 bytes the folders appear but the one supposed to have contained the .exe file has nothing in it I need help please
you mentioned time and time again how python is not meant to be made executable can you tell what it meant to be used as. I hope you will answer it will be much appreciated!!!
This is an excellent point, Python has been hyped as the greatest thing in programming with loads of jobs available for Python programmers but… What is the point of writing applications that run fine on the programmers development system but cannot be distributed to general users unless turned into enormous executables that are much slower to run than the development script! I am a beginner at python but after hours of writing a script that could probably be written much more efficiently I was very disappointed with its performance as an exe. Especially as this was hoped to be a utility that I could distribute easily and quickly to other users. 😟
hey love the tutorial but its giving me an error saying 'pyinstaller' is not recognized as an internal or external command, operable program or batch file. can you help me fix it
I ran into a very embarassing stuff recently. A client of mine asked for a simple result table filtering tool, which I did in Python. It worked wonders on the first version, but then when I released the first revision, all antivirus programs went apeshit like it was some hardcore trojan package. It was because of heuristics and I had to recompile it with dummy files that made the application heftier so the detectors wouldn't bother... It's not a good solution but at least it works now.
@@Renan-yq2qv Você tem que deixar o programa com pelo menos 50mb que é o que os filtros costumam deixar passar. Isso vai reduzir os bloqueios e alguns alertas, mas nunca vai tirar a detecção por completo. Os desenvolvedores do pyinstaller estão cientes mas já disseram que a culpa é do pessoal que faz os antivirus, então vamos ter de conviver com isso.
same BUT what i did was reinstall python and check the option that said "Add To path" or something like that and then reinstall pyinstaller your welcome
If I used an extra library(module) such as requests and converted the .py the .exe would the user be able to run it without having the python and the following module at all?
Can anyone help me in my situation? I write in the "pyinstaller -w -onefile file.py", but that never properly excecutes and tells me that 'pyinstaller is not a recognised internal or external command'. Can anyone help me with this problem??
Windows Defender flags any exe file I created using pyinstaller as a virus. It even deleted it from zip pin drive I was trying to copy to my other computer....apparently you need to register your program with M$ so that your program is not flagged and deleted. How then can I create a few simple programs for my own children's use - a simple Pong game clone, for example - without shelling $60/year just to keep it from being deleted? Kind of makes python useless for indie program development in my opinion.
I might attempt to soon create a minimalistic Python-to-Cpp translator script from a single file C++ 3D Game Engine script so we can almost have the best of both worlds.
someone, anyone please how do I fix mine. when ever I run the exe file. It quickly opens and closes so fast. I've ene turned of my anit-virus protection and fire wall and it does the same shit. someone please tell me
When I execute the last command I get the message: The command "pyinstaller" is either misspelled or could not be found. Even though pyinstaller is installed.
I tried to mix this video with the one about the python Trojan, so I made a .exe file with the game part of the Trojan. When running the server via cmd and the python script, even though the cmd is prompting me to enter a command properly, i can't send any commands to the client. Does anyone know a way to fix this ? Can the .exe file not correctly connect to the server ? The python version works just fine. Thanks !
The client actually connects to the server, and I get terminal access with the "cmdon" command, but the first command I send in cmd_mode gets me a ConnectionAbortedError
@@frapii7834 hm idk weird. I occasionally forget to run it as admin and get that message so i thought you did as well. If you followed the instructions exactly, ive got nothing man 😅 edit: maybe your pc just built different 😂
Do any of you receive the "Failed to execute script main" error? I tried converting several programs and I get the same issue. I used both --onefile and --noconsole and still.
I have no idea why (I reinstalled Python twice and followed some lengthy trouble-shooting steps), but I kept getting this error when trying to install pyinstaller: "pip is not recognized as an internal or external command”. I decided to try it in the PyCharm terminal, and that worked just fine-for whatever reason. Otherwise, this was exactly what I needed. Cheers!
Hello, you msut modify the environment variables adding whre the pip.exe is \script \library\bin Hope you find something mroe detailed and get it solved :D
You're literally making me fall in love to programming again, dude. Keep up the beautiful work!
works awesome!
if it says the file isnt found dont rename your file to (name) with the .py at the end if its already a python file
This is what I was exactly looking for, great video, straight to point while also informative. Nicely done.
Dude, your videos are just a-m-a-z-i-n-g !
thank you :)
Finally complete guide 👍👍
You mentioned at the end that if we want to create an .exe that works you recommend using cpp, c, c# or java.
But isn’t java also an interpreted language?
Great video!
please do not use Java when making apps for normal windows home users =)
@@teemuleppa3347 what should i use for windows ones?
If your program is slow to start, avoid using --onefile. This option bundles everything into one file, similar to a zip. Running it involves extracting everything to a temporary folder, which slows down startup. Without --onefile, there's no extraction, so it starts faster.
Awesome as always 👍😀
Thank you :)
Good video, the problem I've found with PyInstaller though is the Windows Defender picks it up as a virus and deletes it! Most other AV progs are OK but it'd a bit of a problem!
Are these projects that you have done with in the last year only able to be done through the Professional Pycharm download, or can I practice and utilize these projects with the community download.
Completely new to Programming, and all the software that comes with it.
Any PyCharm works fine, the only difference being that Pycharm Professional version has an extra array of features, but the Python is essentially the same, so you can write the same code in the Community edition and nothing will differ
i installed pyinstaller but when i check it, it downloads again then when i do the one file thing it just says it isnt recognised
same
Thanks for making this
Really helps alot
Glad it helps :)
That's nice, but what about packages? For example, I have main.py my_frontend.ui and some modules_1,2,n.py How can I make .exe from these files?
I am trying to convert .py file to .exe . it creates the .exe file but it does not work while the .py file works. its a simple code where i import .csv file and and do some calculation and conditional formatting then try concert it. any suggestion or recommendation?
Do I need to keep the icon.ico file in the same project folder? as it showing error unable to open the .ico file
yes you can keep the .ico file in the same place where the python file is located or in a folder such as an images folder. if you put the .ico file in a folder called images then you would type in the command prompt: pyinstaller --onefile -i images/iconfilename.ico main.py
Bro, how did you make your comand prompt transparent???
"
It is not a cross-compiler
- to make a Windows app you run PyInstaller on Windows
- to make a Linux app you run it on Linux, etc
"
Any workaround this?
It does have a major flaw it doesn't correctly import unkown modules like your vidstream module :(
EDIT: it can import it, just use pyinstaller
help
There is error, when you use option --onefile and made our application in exe.afer that we open that exe it will made a copy of our python script in temp folder.It is dangerous, means we share original python code to client.kindly solve this bug for --one file format.
Can we convert a group of python files or an entire python project, into an executable?
I love you NeuralNine ❤️
when I run my exe on windows 7 I get this message: python exe api ms win core path dwwin.exe api-ms-win-core-version-l1-1-1.dll
I used python 3.9 to create my project. can you please help me ?
I installed the latest virtual c++ package on the win7 pc
still no help.
I did , but It was a problem with cmd, I wrote pip install pyinstaller.
But Cmd said : C:\Users\kingsman>pip install pyinstaller
Fatal error in launcher: Unable to create process using '"c:\program files (x86)\python.exe" "C:\Program Files (x86)\Scripts\pip.exe" install pyinstaller'
After installing pyinstaller, and doing pyinstaller in cmd, i get the error: pyinstaller is not recognized as internal or external...
How do i fix this?
(1) Go to Your required directory
(2) The do exact same in the video (except optional parameters)
@@anshgupta8571 alright thanks for the help!
i adore your vids what software/IDE do you type in?
VSCODE
Will it work if the file needs to import python module? Also will it work on the computer on which python isn't installed?
Hiii and thanx for the video
Was waiting for this!!!
:)
please this is what I get.
struct.error: unpack requires a buffer of 16 bytes
the folders appear but the one supposed to have contained the .exe file has nothing in it
I need help please
great sharing 👍can we just email this exe to a friend so he can use the app too? thanks
Hey this doesn't work for me I've checked many tutorials and it doesn't seem to work
doesn't work for me too...figured something out?
you mentioned time and time again how python is not meant to be made executable can you tell what it meant to be used as. I hope you will answer it will be much appreciated!!!
This is an excellent point, Python has been hyped as the greatest thing in programming with loads of jobs available for Python programmers but…
What is the point of writing applications that run fine on the programmers development system but cannot be distributed to general users unless turned into enormous executables that are much slower to run than the development script!
I am a beginner at python but after hours of writing a script that could probably be written much more efficiently I was very disappointed with its performance as an exe. Especially as this was hoped to be a utility that I could distribute easily and quickly to other users. 😟
hey love the tutorial but its giving me an error saying 'pyinstaller' is not recognized as an internal or external command,
operable program or batch file. can you help me fix it
works well and does not open a dos like shell. Great example
TypeError: expected str, bytes or os.PathLike object, not BytesIO
[12228] Failed to execute script 'main' due to unhandled exception!
But what if I have many py files and directories, wich form the app?
Does it work with x64 Windows?
Can you send it to someone else n would it still work??
Everytime I try and do this it says it isn't found but I do it right everytime all the other folders pop up please help me
i wrote a game in python with kivy but after doing this i cant run my game how do i get this to work
"pip is not recognized as internal or external command" can you help me 😰
You need to say “ install pip “ in cmd
@@abdullahafzal3691 i soloved it. need to save scripts folder's location in system environment variables
I ran into a very embarassing stuff recently. A client of mine asked for a simple result table filtering tool, which I did in Python. It worked wonders on the first version, but then when I released the first revision, all antivirus programs went apeshit like it was some hardcore trojan package. It was because of heuristics and I had to recompile it with dummy files that made the application heftier so the detectors wouldn't bother... It's not a good solution but at least it works now.
Tive o mesmo problema, mas no meu caso ele persistiu
@@Renan-yq2qv Você tem que deixar o programa com pelo menos 50mb que é o que os filtros costumam deixar passar. Isso vai reduzir os bloqueios e alguns alertas, mas nunca vai tirar a detecção por completo. Os desenvolvedores do pyinstaller estão cientes mas já disseram que a culpa é do pessoal que faz os antivirus, então vamos ter de conviver com isso.
Madman directly dives into how to properly write a virus 1:22
Is some way to convert whole python project to one executable file?
Yes, download NSIS, zip your project and covert project from zip
@@xMSaccountx thanks so much
'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.
thats what it says
it gives me pyinstaller is not recognized as internel or external command any help
pls help me i did everything and it says frkn
'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.
same BUT
what i did was reinstall python and check the option that said "Add To path" or something like that and then reinstall pyinstaller
your welcome
When I attempt to install this I get a windows anti virus pop up and it says it detects Trojan:androidOS/multiverse can anyone explain?
If I used an extra library(module) such as requests and converted the .py the .exe would the user be able to run it without having the python and the following module at all?
To be honest I have not tried it but I think since the file is so huge it has everything it needs inside of it
Yes, it is going to work.
Can anyone help me in my situation? I write in the "pyinstaller -w -onefile file.py", but that never properly excecutes and tells me that 'pyinstaller is not a recognised internal or external command'. Can anyone help me with this problem??
same!
do ‘pip install pyinstaller’ you skipped this step mentioned in the video maybe
also do ‘activate main’ before ‘pip install pyinstaller’
@@jeremyko8264 that didnt work
Hi bro..
do you know if creating exe file using pyinstaller is easy to reverse to code?
No because you can only do that on c. Maybe you can do that with binary or hex code, but it’s still a hella lot longer process
Windows Defender flags any exe file I created using pyinstaller as a virus. It even deleted it from zip pin drive I was trying to copy to my other computer....apparently you need to register your program with M$ so that your program is not flagged and deleted. How then can I create a few simple programs for my own children's use - a simple Pong game clone, for example - without shelling $60/year just to keep it from being deleted? Kind of makes python useless for indie program development in my opinion.
how can we create unpackable exe files? Does go lang create such executables? Unpacking: exe files to source code.
Will people able to retrieve the Python code from the EXE?
I might attempt to soon create a minimalistic Python-to-Cpp translator script from a single file C++ 3D Game Engine script so we can almost have the best of both worlds.
It says failed to execute script main
someone, anyone please how do I fix mine.
when ever I run the exe file. It quickly opens and closes so fast.
I've ene turned of my anit-virus protection and fire wall and it does the same shit.
someone please tell me
How compile main.py to EXE with tensorflow and .h5 file???
Does this work with database gui
Sir how to send this file on a device that doesn't have python on it
>>Nice work, but how can we convert .py file having matlab library to .exe file?
When I execute the last command I get the message: The command "pyinstaller" is either misspelled or
could not be found. Even though pyinstaller is installed.
it needs to be added to PATH which is done during installation
Virus warnings after trying to run .py program converted to an .exe file
how to fix this, bro!
Unfortunately it's an issue with Windows Defender, would recommend something like Avast instead.
Nice job! explained
Bro can you tell me how to conver .py with MySQL to exe to run in clint s pc.
when i convert to exe file and send to my friend, it says the file contains virus
@@trw8777 how?
@@trw8777 but can we do it without the .bat file?
@@LP-ln9zl whats the difference
Yep, known issue with Microsoft Defender unfortunately
Keep them coming!
hey, ı try it same as you but in return ı got an exe not with my ico
sir, how is main.exe converted to text python?
thank you..this helped me a lot...
for me cmd saying access denied 😔 can somebody tell why this happening
I tried to mix this video with the one about the python Trojan, so I made a .exe file with the game part of the Trojan. When running the server via cmd and the python script, even though the cmd is prompting me to enter a command properly, i can't send any commands to the client. Does anyone know a way to fix this ? Can the .exe file not correctly connect to the server ? The python version works just fine. Thanks !
The client actually connects to the server, and I get terminal access with the "cmdon" command, but the first command I send in cmd_mode gets me a ConnectionAbortedError
Wow this is is an absolute gem.
can you please make video : How to insert libraries like "pyfiglet" to exe?
why its wrong to compile python scripts?
Thanks dude!
Imagine the amount of residual income that has been generated from this 1 video…
Iam trying to convert a python file since weeks but everytime I try it says "system can't access the file" do u have an idea what iam supposed to do?
maybe you don't have the necessary privileges?
@@NeuralNine yes that's what it probably is but I don't know how to change that. Bcs I should have the privileges.
You most likely made it work by now, but you probably just didn't run cmd as admin
@@SkuezTech I still didn't get it to work and I did run cmd as an admin
@@frapii7834 hm idk weird. I occasionally forget to run it as admin and get that message so i thought you did as well. If you followed the instructions exactly, ive got nothing man 😅 edit: maybe your pc just built different 😂
Do any of you receive the "Failed to execute script main" error? I tried converting several programs and I get the same issue. I used both --onefile and --noconsole and still.
for gui's u should use -F -w -i "icon.ico" main.py
I have an problem can you help me
what about cx_freeze
Where u from ?
what's name of this song!?
What's is name this music
when i enter cd Desktop it says that the path does,t exixst ??????????????
goto esplorer and type cmd to go desktop
Hi sir,
But how to make exe for window 7
Unable to open ico file how to fix this
Help! it says file not found while i know for sure i typed it right
try to write path, for example: projects\main.py
Can u do raspberry pi cam videos? Plz
How to create a standalone exe ?
I have no idea why (I reinstalled Python twice and followed some lengthy trouble-shooting steps), but I kept getting this error when trying to install pyinstaller: "pip is not recognized as an internal or external command”. I decided to try it in the PyCharm terminal, and that worked just fine-for whatever reason. Otherwise, this was exactly what I needed. Cheers!
Hello, you msut modify the environment variables adding whre the pip.exe is
\script
\library\bin
Hope you find something mroe detailed and get it solved :D
Awesome 👍👍 thanks
detected a trojan horse in the pyinstaller?
Known issue with Microsoft Defender
Thanks a lot, but like u said python isn't meant to be compiled 👍
How to compress pyinstaller .exe
super
6 mb python script will be around 6-7000 lines of code
6 mb python script will be one library in exe
cool
syntax error
Great
thanks :)
"activate" is not recognzed as a command
Skip that step of you don't have a conda environment