1

Upon reaching the python installation directory and running pip install pygame, I'm greeted by the following outputs/errors:

>pip install pygame Collecting pygame Using cached https://files.pythonhosted.org/packages/b2/6b/c510f0853765eb2219ca5aa3d416d65bb0dea7cd9bb2984aea0a0e04c24d/pygame-1.9.4.tar.gz Complete output from command python setup.py egg_info: WARNING, No "Setup" File Exists, Running "config.py" Using WINDOWS configuration... Path for SDL not found. Too bad that is a requirement! Hand-fix the "Setup" Path for FONT not found. Path for IMAGE not found. Path for MIXER not found. Path for PNG not found. Path for JPEG not found. Path for PORTMIDI not found. Path for COPYLIB_tiff not found. Path for COPYLIB_z not found. Path for COPYLIB_vorbis not found. Path for COPYLIB_ogg not found. If you get compiler errors during install, doublecheck the compiler flags in the "Setup" file. Continuing With "setup.py" Error with the "Setup" file, perhaps make a clean copy from "Setup.in". --- For help with compilation see: https://www.pygame.org/wiki/CompileWindows To contribute to pygame development see: https://www.pygame.org/contribute.html --- C:\Users\my_name\AppData\Local\Temp\pip-install-j6yqlzbo\pygame\setup.py:321: SyntaxWarning: invalid escape sequence \d return ', '.join(s for s in findall('\d+', ver)[0:3]) Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\my_name\AppData\Local\Temp\pip-install-j6yqlzbo\pygame\setup.py", line 203, in <module> extensions = read_setup_file('Setup') File "c:\users\my_name\appdata\local\programs\python\python38\lib\distutils\extension.py", line 171, in read_setup_file line = expand_makefile_vars(line, vars) File "c:\users\my_name\appdata\local\programs\python\python38\lib\distutils\sysconfig.py", line 405, in expand_makefile_vars s = s[0:beg] + vars.get(m.group(1)) + s[end:] TypeError: can only concatenate str (not "NoneType") to str ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in C:\Users\my_name\AppData\Local\Temp\pip-install-j6yqlzbo\pygame\ 

I searched through everywhere I knew to look, but I couldn't find an answer.

Edit: I just upgraded pip (the issue still persists), and I'm using Python 3.8.0a1, Windows 10 64 bit.

Edit 2: I managed to solve the issue. I uninstalled Python 3.8.0a1, and installed 3.7 instead. Then, pygame installed without a problem.

2
  • I'm assuming this is all part of the output. So i put it all in a code block instead, easier to read the output and the command used. Commented Feb 17, 2019 at 20:11
  • That's how I intended it to be, but I couldn't figure out how to do it. Thank you! Commented Feb 17, 2019 at 20:14

2 Answers 2

1

Apparently, I was using the wrong version of python. Once I downgraded to Python 3.7 (from Python 3.8.0a1), updated pip by using pip install --upgrade pip, I could install pygame with the command pip install pygame.

Sign up to request clarification or add additional context in comments.

Comments

0

This has happened to multiple people and I think it is because pygame uses the library SDL 1.2. Try this: Installing pygame with pip: Command "python setup.py egg_info" failed with error code 1 method and respond if it works.

1 Comment

I attempted doing as you instructed, tried installing the 64 and the 32 bit version of the file, but both returned "<filename> is not a supported wheel on this platform."

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.