+ 5

How to convert python code to a .EXE files for Windows?

i have been trying to convert my python code to an executable file (.exe) i want to share my file with a non coder friend (he wants to play my new game which is .py) he doesn't have python 3.x and doesn't want to download it. so i need to make a installer of my code. i tried using cx_freeze (path error: doesnt exist) pyinstaller (module error: alot of missing modules that doesn't exist) module used : pygaame coded in python 3.7 please help me

20th Aug 2018, 12:46 AM
Dazer
Dazer - avatar
11 odpowiedzi
+ 4
Try to use Py2exe software and this code https://code.sololearn.com/cWzhP6ARzpJK/?ref=app
21st Aug 2018, 10:02 AM
Sarvesh Yadav
Sarvesh Yadav - avatar
+ 2
i will surely try it out
21st Aug 2018, 10:07 AM
Dazer
Dazer - avatar
+ 1
pyinstallers don’t see second level imports, and your imports dependencies aren’t included in the exe file You can add this missing imports into your code
20th Aug 2018, 6:48 PM
Zguillez
Zguillez - avatar
+ 1
Dazer naah!
21st Aug 2018, 10:06 AM
Sarvesh Yadav
Sarvesh Yadav - avatar
+ 1
cx freeze is probably the best
21st Aug 2018, 3:41 PM
🅿️®️⭕️_e✖️e
🅿️®️⭕️_e✖️e - avatar
+ 1
if you are getting module error pip install wheel and download cx_freeze or pyinstaller from unofficial python binaries. open powershell on the downloaded folder using following commands install pyinstaller or cx_freeze pip install ./pyinstaller your error will be resolved the error is due to visual c++ 14.0
21st Aug 2018, 7:43 PM
Ashraf ali
Ashraf ali - avatar
+ 1
i will try out all the ways and pin the best one here 😊😊 thabk you for sending all this options to resolve my problem i have visual c++ 14.0 but the cx_freeze has an error of the path
22nd Aug 2018, 4:17 AM
Dazer
Dazer - avatar
0
how do i do that?
21st Aug 2018, 6:13 AM
Dazer
Dazer - avatar
0
oh ok, i will try that but does it need cx_freeze?
21st Aug 2018, 10:05 AM
Dazer
Dazer - avatar
0
have you checked nuitka? http://nuitka.net/pages/overview.html
22nd Aug 2018, 3:52 AM
Mariusz Andziak
- 3
You don't. Why do so many people want to do that? Just use C if you want an .exe file.
21st Aug 2018, 5:39 PM
N00B