Pygame (Python Game Development) Tutorial - 41 - Finish Converting to Executable

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

When I try to open the exe (after building it or using the installer), a cmd window briefly opens and immediately closes again. What could be the problem?

njmongoose
Автор

Is there a specific way of doing it in Ubuntu or will it suffice? because I am able to get the build file but unable to execute the executable file which in my case is main.

when i run the command ./main it shows the error, ImportError: No module named __startup__

MONUKUMAR-jkxl
Автор

the build process went through but it says im missing modules. and when i go to open the app it doesnt stay...

viashadow
Автор

Is there a way to include a folder that has photos so I dobt have to individually add each one?
Im working on a big game that uses A LOT of phots and doing each one, one by one, could be tedious 😪

aking
Автор

TO THOSE OF YOU HAVING THE FOLLOWING ERROR:

KeyError: 'TCL_LIBRARY

You are not alone. Many people are having this issue, myself included. I searched the internet high and low for about 6 hours looking for a solution. At the time of writing this, there is no solution. The problem has to do with a compatibility issue with cx_Freeze and Python3.5. *The only help I've found is to do the following:*

1) Uninstall python3.5 from your computer. Clean slate.
2) Install Python 3.4.4
3) Find the compatible pygame 3.4 wheel version and install that.
4) Install cx_Freeze 3.4
5) Make sure Python3.4 is in your path so you can use it in the command prompt like shown in this video.
6) If you have a problem with the above step, Google it.
7) Before you can make your .exe make sure to check your code for this line:

font = pygame.font.SysFont(None, 25)

cx_Freeze doesn't know what to do with the "None" option and your .exe will not run with it there. Change it to "arial" for now (you can change it to another system font later).

8) Follow the instructions in this video, and everything should work.


Note: if you were getting another error besides "KeyError: 'TCL_LIBRARY" then I cannot help you. I spent hours researching this problem because I saw dozens of other people with the same issue. But there are other issues out there I am not sure of.

DrKorvett
Автор

I tried making a Microsoft installer but from some reason at the end of the execution of setup.py it just deletes the executable

XOPGAMINGX
Автор

Thanks for all the help! It felt great to see a game from start to finish

mattgoodman
Автор

If you use a full path to a custom font, do you have to add anything in the setup.py file?

mark_larsen
Автор

i get an error in executables = executables
and then a syntax error is shown somewhere in the python file print "Unable to find a working movie backend. Loading the dummy movie class..."


PLEASE HELP

kvrule
Автор

it says it's missing a libvorvisfile.dll file what do I do?

TheGameChainJS
Автор

UserWarning: Unknown distribution option: 'excecutables'
I keep getting this and i have no idea what it means or what to do.

TheWaynestark
Автор

I got error like this 'NoneType' object has no attribute 'split', any idea how to fix it?

RetroNora
Автор

So I get it to build the exe but when I click said exe for my game I get a crash and the following error in the command window.

Fatal Python error: Py_Initialize: Unable to load the file system codec
Traceback (most recent call last):

File "C:\Users\me\AppData\Local\Programs\Python\Python36\lib\encodings\__unit__.py", Line 31, In <module>
ModileNotFoundError: No modile named 'codecs'

Any thoughts?

JarJarWookie
Автор

5:03 I think numpy is required for some pixels or graphics things in Pygame, as I have seen in the Pygame documentation..🤔

vaibhavkrkm
Автор

I completed everything and at last, my game is running and when I crash into edges the exe is not responding anymore !! Same code works fine in IDE for all cases. Help me through this

satyaprasanthseethepalli
Автор

when i open the second folder i get lib tcl tk the 2 images a dll file and the game .exe when i double click it it opens and shuts down real quick

avenger_aawin
Автор

Everything done but after building the .exe file, the .exe file is not running.

tanoychowdhury
Автор

I think some commands might be outdated in here... I'm using ubuntu 16.04 and the executable generated is not oppening at all...

caducealves
Автор

I'm having an issue with cx_Freeze.. downloaded and installed but it just doesn't seem to work..

MrKartos
Автор

Is there a way to make it open just the game window itself and not with that black window?

luckingk
welcome to shbcf.ru