You installed python 2.7 and pygame 2.6. There's a problem. In the pygame website it says to specifically choose the version that is the same as your python version. If you install 2.6 pygame, python 2.7 ignores it because it is for 2.6, but 2.7 is running python 2.7, not 2.6. use this link to install pygame 2.7:
-1.9.1.win32-py2.7.msi
-1.9.2a0.win32-py2.7.msi
Also, if you need pygame, install python 32-bit, not 64-bit. There is no pygame 64-bit. Unfortunate...
This is a simple question. I have been making a game, and I wanted some of my friends to be able to download it online. Do they have to have pygame and python installed on there computer to download it. The reason I ask is because Im also thinking about releasing it to the general audience and if they can't download because they don't have pygame, well I probably won't get much feedback or success. Thank you.
The .exe file will contain the python interpreter, all the modules like pygame, and if there are any external files like images, sounds, 3d objects etc, they will be embedded inside the .exe file so that the general audience wont need to install any external softwares and this also makes your game hack proof.
I'm not sure how to deal with installing python, but I added this bit of code to the beginning of my most recent program which is designed to automatically install pygame on launch through cmd using pip.
I want to compile a game I made in Python. I searched around for compilers and I prefer Nuitka because it is cross-platform. But whenever I try to compile my code with Nuitka using nuitka --recurse-all --standalone myappname.py I get this error:
I decided it's about time for me try something different and also to write a kick-ass image selector program. I googled a bit what frameworks I could use and I picked pygame semi random.
I had not actually used pygame before, but I was told it is one of the easiest way to start building a graphics application. It was easy to setup (used my distro's package manager), opened my favourite editor and started coding. Overall it took me about 4-5 hour to get the desired functionality. I had a few major stumbling blocks:
That being said, I wasn't particularly proud of how it looked in pygame, and the interface was strictly command line which severely limits the potential user pool. Furthermore most of my friends actually don't run Linux as their main operating system (surprise). Thinking about it, I wanted to use a cross-platform toolkit with with minimum installation burden. Making a full fledged executable out of pygame looked like too much of a hassle so I looked elsewhere:
Unlike pygame, Qt has extensive documentation with plenty of examples for most situation. The recommended way to start using it is with the Qt Creator IDE, which takes care of the boilerplate and lets you focus on the code. Scaling images properly is now a just a matter of providing Qt::KeepAspectRatio as an argument. The main program loop is taken care of by the Qt framework and event management is a bliss.
Winner: pygame
While Qt is much friendlier when doing advanced things, it requires a few hours of reading before you can get anything out. With pygame I had my initial window that displays images in about 15 minutes. With Qt, that took about 2 hours of reading and set up.
Winner: Qt
After the initial steep learning curve, Qt becomes very pleasant to work with. Event management is very clean, the visual editor is newbie friendly, functionality is much richer and the documentation and examples available online make it a lot easier to add functionality compared with pygame. Just for comparison, my image scaling code is about 20 lines in python and just 1 line in Qt.
Winner: Qt. Maybe
Pygame should run anywhere where python is installed, right? Yes, but sometimes on mac input doesn't work. Getting it installed on windows is very simple, as long as you are running a python 2.7 or 3.2. For anything newer you need to recompile pygame yourself. There are options apparently for getting an .exe but it's not as straightforward as I hoped.
Normally, it would be very easy to port the application to windows, because you can just cross-compile it using mingw. However, as C++17 filesystem is not yet supported, I had to boot up Windows and compile my application using Microsoft Visual Studio C++ compiler (free). Unfortunately, MSVC++ by default does not assume any string is UTF-8 formatted and requires special conversion first, which is... Annoying. Other than that, everything else works out of the box. Again, this issue will be resolved when mingw supports C++17 filesystem for cross-compilation.
To build Pygame with MingW but without Msys the dependencies are expected to be in the subdirectory prebuilt. Prepare prebuilt as follows. Copy /usr/local as the prebuilt subdirectory of the pygame directory. Next go into prebuilt\include and move all the header files in SDL and libpng12 into include so the compiler will find them. Now you are ready to execute setup.py from a normal command prompt, assuming the MINGW_ROOT_DIRECTORY environment variable is set and the gcc binaries are in the executables search path:
The online documentation stays up to date with the development versionof pygame on github. This may be a bit newer than the version of pygameyou are using. To upgrade to the latest full release, runpip install pygame --upgrade in your terminal.
Installing from source is fairly automated. The most work willinvolve compiling and installing all the pygame dependencies. Oncethat is done, run the setup.py script which will attempt toauto-configure, build, and install pygame.
Marcus Von Appen: many changes, and fixes, 1.7.1+ freebsd maintainer
This basically means you can use pygame in any project you want,but if you make any changes or additions to pygame itself, thosemust be released with a compatible license (preferably submittedback to the pygame project). Closed source and commercial games are fine.
I want to use pygame, but I am having trouble installing/using it. It appears to be installed, but Python cannot find it. I know there are several similar questions about this, but none of them gave an answer that worked for me.
I also found something about 32 bit vs 64 bit problems. Could that be it? In which case, how can I install the correct pygame version when sudo apt-get doesn't know it?These related questions made me think it might be a 32/64-bit-issue (they are about Pygame on other OS than Ubuntu):
There are two ways to install the Futhark compiler: using aprecompiled tarball or compiling from source. Both methods arediscussed below. If you are using Linux, seeInstalling Futhark on Linux. If you are using Windows, make sure toread Installing Futhark on Windows. If you are using macOS, readInstalling Futhark on macOS.
Note that this will not install anything system-wide and will have noeffect outside the Futhark build directory. Now you can run thefollowing command to build the Futhark compiler, including alldependencies:
Furthermore, every day a program automatically clones the Gitrepository, builds the compiler, and packages a simple tarballcontaining the resulting binaries, built manpages, and a simpleMakefile for installing. The implication is that these tarballsare not vetted in any way, nor more stable than Git HEAD at anyparticular moment in time. They are provided for users who wish touse the most recent code, but are unable to compile Futharkthemselves.
While the Futhark compiler itself is easily installed on Windows viastack (see above), it takes a little more work to make the OpenCLand PyOpenCL backends functional. This guide was last updated on the5th of May 2016, and is for computers using 64-bit Windows along withCUDA 7.5 and Python 2.7 (Anaconda preferred).
There are two main ways to install the Futhark compiler: using aprecompiled tarball or compiling from source. Both methods arediscussed below. If you are using Linux, seeInstalling Futhark on Linux. If you are using Windows, make sure toread Setting up Futhark on Windows. If you are using macOS, readInstalling Futhark on macOS.
df19127ead