2

I'm pretty new to python. I am currently trying to install the requirements.txt from a program, someone wrote, because I'm interested in how it works. So, the requirements are:

pygame==2.0.0.dev10

scipy==1.4.1

Whenever I try to install them, the following happens:

WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using WINDOWS configuration...

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\schne\AppData\Local\Temp\pip-install-5wijmhxv\pygame_4c7459d9ada34e90b72cf5ca2d31ce75\setup.py", line 306, in <module>
    buildconfig.config.main(AUTO_CONFIG)
  File "C:\Users\schne\AppData\Local\Temp\pip-install-5wijmhxv\pygame_4c7459d9ada34e90b72cf5ca2d31ce75\buildconfig\config.py", line 221, in main
    deps = CFG.main(**kwds)
  File "C:\Users\schne\AppData\Local\Temp\pip-install-5wijmhxv\pygame_4c7459d9ada34e90b72cf5ca2d31ce75\buildconfig\config_win.py", line 559, in main
    and download_win_prebuilt.ask(**download_kwargs):
  File "C:\Users\schne\AppData\Local\Temp\pip-install-5wijmhxv\pygame_4c7459d9ada34e90b72cf5ca2d31ce75\buildconfig\download_win_prebuilt.py", line 275, in ask
    update(x86=x86, x64=x64, sdl2=sdl2)
  File "C:\Users\schne\AppData\Local\Temp\pip-install-5wijmhxv\pygame_4c7459d9ada34e90b72cf5ca2d31ce75\buildconfig\download_win_prebuilt.py", line 258, in update
    download_prebuilts(download_dir, x86=x86, x64=x64, sdl2=sdl2)
  File "C:\Users\schne\AppData\Local\Temp\pip-install-5wijmhxv\pygame_4c7459d9ada34e90b72cf5ca2d31ce75\buildconfig\download_win_prebuilt.py", line 107, in download_prebuilts
    download_sha1_unzip(url, checksum, temp_dir, 1)
  File "C:\Users\schne\AppData\Local\Temp\pip-install-5wijmhxv\pygame_4c7459d9ada34e90b72cf5ca2d31ce75\buildconfig\download_win_prebuilt.py", line 40, in download_sha1_unzip
    response = urllib.urlopen(request).read()
  File "C:\Users\schne\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "C:\Users\schne\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 523, in open
    response = meth(req, response)
  File "C:\Users\schne\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 632, in http_response
    response = self.parent.error(
  File "C:\Users\schne\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 561, in error
    return self._call_chain(*args)
  File "C:\Users\schne\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 494, in _call_chain
    result = func(*args)
  File "C:\Users\schne\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
Making dir :prebuilt_downloads:
Downloading... https://www.libsdl.org/release/SDL2-devel-2.0.12-VC.zip 6839b6ec345ef754a6585ab24f04e125e88c3392
Unzipping :prebuilt_downloads\SDL2-devel-2.0.12-VC.zip:
Downloading... https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.5-VC.zip 137f86474691f4e12e76e07d58d5920c8d844d5b
Unzipping :prebuilt_downloads\SDL2_image-devel-2.0.5-VC.zip:
Downloading... https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-devel-2.0.15-VC.zip 1436df41ebc47ac36e02ec9bda5699e80ff9bd27
Unzipping :prebuilt_downloads\SDL2_ttf-devel-2.0.15-VC.zip:
Downloading... https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-devel-2.0.4-VC.zip 9097148f4529cf19f805ccd007618dec280f0ecc
Unzipping :prebuilt_downloads\SDL2_mixer-devel-2.0.4-VC.zip:
Downloading... https://www.ijg.org/files/jpegsr9d.zip ed10aa2b5a0fcfe74f8a6f7611aeb346b06a1f99
Unzipping :prebuilt_downloads\jpegsr9d.zip:
Downloading... https://bitbucket.org/llindstrom/pygame/downloads/prebuilt-x64-pygame-1.9.2-20150922.zip 3a5af3427b3aa13a0aaf5c4cb08daaed341613ed

---
For help with compilation see:
    https://www.pygame.org/wiki/CompileWindows
To contribute to pygame development see:
    https://www.pygame.org/contribute.html
---

----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/fd/87/6ffe2a745a4a1032594b3caab942edb4244d5a02d314fb8d2258e3a403fd/pygame-2.0.0.dev10.tar.gz#sha256=c4437da0c3d5e73a1f1e3c4a4313f7e8ca7eae472a1686840b1f34989ffae08a (from https://pypi.org/simple/pygame/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pygame==2.0.0.dev10 (from versions: 1.9.2rc1, 1.9.2, 1.9.3, 1.9.4.dev0, 1.9.4rc1, 1.9.4, 1.9.5rc1, 1.9.5rc2, 1.9.5, 1.9.6rc1, 1.9.6rc2, 1.9.6, 2.0.0.dev1, 2.0.0.dev2, 2.0.0.dev3, 2.0.0.dev4, 2.0.0.dev6, 2.0.0.dev8, 2.0.0.dev10, 2.0.0.dev12, 2.0.0.dev14, 2.0.0.dev16, 2.0.0.dev18, 2.0.0.dev20, 2.0.0.dev22, 2.0.0.dev24, 2.0.0, 2.0.1.dev1, 2.0.1)
ERROR: No matching distribution found for pygame==2.0.0.dev10
WARNING: Ignoring invalid distribution -ip (c:\users\schne\appdata\local\programs\python\python39\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\users\schne\appdata\local\programs\python\python39\lib\site-package

s)

Most of the time only this appears:

    WARNING: Discarding https://files.pythonhosted.org/packages/fd/87/6ffe2a745a4a1032594b3caab942edb4244d5a02d314fb8d2258e3a403fd/pygame-2.0.0.dev10.tar.gz#sha256=c4437da0c3d5e73a1f1e3c4a4313f7e8ca7eae472a1686840b1f34989ffae08a (from https://pypi.org/simple/pygame/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pygame==2.0.0.dev10 (from versions: 1.9.2rc1, 1.9.2, 1.9.3, 1.9.4.dev0, 1.9.4rc1, 1.9.4, 1.9.5rc1, 1.9.5rc2, 1.9.5, 1.9.6rc1, 1.9.6rc2, 1.9.6, 2.0.0.dev1, 2.0.0.dev2, 2.0.0.dev3, 2.0.0.dev4, 2.0.0.dev6, 2.0.0.dev8, 2.0.0.dev10, 2.0.0.dev12, 2.0.0.dev14, 2.0.0.dev16, 2.0.0.dev18, 2.0.0.dev20, 2.0.0.dev22, 2.0.0.dev24, 2.0.0, 2.0.1.dev1, 2.0.1)
ERROR: No matching distribution found for pygame==2.0.0.dev10
WARNING: Ignoring invalid distribution -ip (c:\users\schne\appdata\local\programs\python\python39\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\users\schne\appdata\local\programs\python\python39\lib\site-packages)

The readme tells me:

Super Mario Implementation in Python

Running

  • $ pip install -r requirements.txt
  • $ python main.py

Standalone windows build

  • $ pip install py2exe
  • $ python compile.py py2exe

I don't know why there is a dollar sign, but installing works for my only with this:

python -m

before I write the rest like pip install ...

Installing py2exe was possible, but excecuting python compile.py py2exe does not work, because for that I need SciPy. Here is what it tells me:

D:\super-mario-python>python compile.py py2exe
running py2exe
pygame 2.0.1 (SDL 2.0.14, Python 3.9.5)
Hello from the pygame community. https://www.pygame.org/contribute.html

  7 missing Modules
  ------------------
? OpenGL                              imported from pygame
? Queue                               imported from pygame.threads
? _posixshmem                         imported from multiprocessing.resource_tracker, multiprocessing.shared_memory
? numpy                               imported from pygame, pygame._numpysndarray, pygame._numpysurfarray
? readline                            imported from cmd, code, pdb
? resource                            imported from test.support
? scipy                               imported from classes.GaussianBlur

  2 submodules that appear to be missing, but could also be global names in the parent package
  ---------------------------------------------------------------------------------------------
? pygame.overlay                      imported from pygame
? pygame.sdlmain_osx                  imported from pygame.macosx
Building 'dist\main.exe'.
Building shared code archive 'dist\library.zip'.
Copy c:\users\schne\appdata\local\programs\python\python39\python39.dll to dist
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\unicodedata.pyd to dist\unicodedata.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_bz2.pyd to dist\_bz2.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_lzma.pyd to dist\_lzma.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\select.pyd to dist\select.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\pyexpat.pyd to dist\pyexpat.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_socket.pyd to dist\_socket.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_hashlib.pyd to dist\_hashlib.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_decimal.pyd to dist\_decimal.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_ssl.pyd to dist\_ssl.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_queue.pyd to dist\_queue.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_elementtree.pyd to dist\_elementtree.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_ctypes.pyd to dist\_ctypes.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_tkinter.pyd to dist\_tkinter.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_testinternalcapi.pyd to dist\_testinternalcapi.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_testcapi.pyd to dist\_testcapi.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_asyncio.pyd to dist\_asyncio.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_multiprocessing.pyd to dist\_multiprocessing.pyd
Copy C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\_overlapped.pyd to dist\_overlapped.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\base.cp39-win_amd64.pyd to dist\pygame.base.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\constants.cp39-win_amd64.pyd to dist\pygame.constants.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\rect.cp39-win_amd64.pyd to dist\pygame.rect.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\rwobject.cp39-win_amd64.pyd to dist\pygame.rwobject.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\surflock.cp39-win_amd64.pyd to dist\pygame.surflock.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\color.cp39-win_amd64.pyd to dist\pygame.color.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\bufferproxy.cp39-win_amd64.pyd to dist\pygame.bufferproxy.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\math.cp39-win_amd64.pyd to dist\pygame.math.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\display.cp39-win_amd64.pyd to dist\pygame.display.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\draw.cp39-win_amd64.pyd to dist\pygame.draw.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\event.cp39-win_amd64.pyd to dist\pygame.event.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\image.cp39-win_amd64.pyd to dist\pygame.image.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\joystick.cp39-win_amd64.pyd to dist\pygame.joystick.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\key.cp39-win_amd64.pyd to dist\pygame.key.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\mouse.cp39-win_amd64.pyd to dist\pygame.mouse.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\time.cp39-win_amd64.pyd to dist\pygame.time.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\mask.cp39-win_amd64.pyd to dist\pygame.mask.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\transform.cp39-win_amd64.pyd to dist\pygame.transform.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\pixelcopy.cp39-win_amd64.pyd to dist\pygame.pixelcopy.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\surface.cp39-win_amd64.pyd to dist\pygame.surface.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\pixelarray.cp39-win_amd64.pyd to dist\pygame.pixelarray.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\_freetype.cp39-win_amd64.pyd to dist\pygame._freetype.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\font.cp39-win_amd64.pyd to dist\pygame.font.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\mixer_music.cp39-win_amd64.pyd to dist\pygame.mixer_music.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\mixer.cp39-win_amd64.pyd to dist\pygame.mixer.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\scrap.cp39-win_amd64.pyd to dist\pygame.scrap.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\fastevent.cp39-win_amd64.pyd to dist\pygame.fastevent.pyd
Copy C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\imageext.cp39-win_amd64.pyd to dist\pygame.imageext.pyd
Copy DLL C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\tcl86t.dll to dist\
Copy DLL C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\libssl-1_1.dll to dist\
Copy DLL C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\zlib1.dll to dist\
Copy DLL C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\SDL2_image.dll to dist\
Copy DLL C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\tk86t.dll to dist\
Copy DLL C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\libfreetype-6.dll to dist\
Copy DLL C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\libffi-7.dll to dist\
Copy DLL C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\SDL2.dll to dist\
Copy DLL C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\SDL2_mixer.dll to dist\
Copy DLL C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\SDL2_ttf.dll to dist\
Copy DLL C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\libpng16-16.dll to dist\
Copy DLL C:\Users\schne\AppData\Local\Programs\Python\Python39\DLLs\libcrypto-1_1.dll to dist\
Copy DLL C:\Users\schne\AppData\Roaming\Python\Python39\site-packages\pygame\libjpeg-9.dll to dist\
error: [Errno 2] No such file or directory: 'settings.json'

I've already tried to uninstall pygame, but nothing changes. It always tells me it can't install pygame 2.0.0.dev10, because the version was not found, only the other ones like pygame 2.0.0.dev10 Futhermore, SciPy is not getting installed either. It doesn't even tries to install SciPy from the requirements. I know, it is a lot, but I would be really happy about some help.

1 Answers1

0

Your python version 3.9.5might not be compatible with pygame==2.0.0.dev10 orscipy==1.4.1

Thus try to create an environment with older python version

If you are using Anaconda :

conda create --name mario python=3.7

then

source activate mario

pip install -r requirements.txt

I tried on python 3.7 and it successfully worked

Note: Without Anaconda

you must install virtualenv

pip install virutalenv

Then you might need to download the python version you need ( e.g 3.7)

virtualenv -p /path/to/any/bin/python mario

source activate mario

Skaddd
  • 153
  • 8
  • Thanks for answering, but it is already fixed. It all works fine with the newest pygam, scipy and python versions. I just had to install scipy. Since the requirements say scipy 1.4.1 I only tried to install this version. – NuclearAugustus May 19 '21 at 09:32