Erreur à l'installation de Pygame
Nathanael
-
_Ritchi_ Messages postés 21333 Date d'inscription Statut Contributeur Dernière intervention -
_Ritchi_ Messages postés 21333 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
J'utilise un mac et voulant apprendre a créer des jeux sur python j'ai chercher comment installer le module "Pygame".
Cependant dès que j'entre la commande: "python -m pip install pygame" sur le terminal afin de le télécharger mais j'ai le mesage suivant qui apparaît:
"DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting pygame
Using cached pygame-2.0.3.tar.gz (5.8 MB)
ERROR: Command errored out with exit status 1:
command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m1/yzm3v_s10gz08cmbkzwmq5l80000gn/T/pip-install-K6SCQL/pygame/setup.py'"'"'; __file__='"'"'/private/var/folders/m1/yzm3v_s10gz08cmbkzwmq5l80000gn/T/pip-install-K6SCQL/pygame/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/m1/yzm3v_s10gz08cmbkzwmq5l80000gn/T/pip-pip-egg-info-OO6FLI
cwd: /private/var/folders/m1/yzm3v_s10gz08cmbkzwmq5l80000gn/T/pip-install-K6SCQL/pygame/
Complete output (27 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using Darwin configuration...
sh: sdl2-config: command not found
sh: sdl2-config: command not found
sh: sdl2-config: command not found
---
For help with compilation see:
https://www.pygame.org/wiki/MacCompile
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/m1/yzm3v_s10gz08cmbkzwmq5l80000gn/T/pip-install-K6SCQL/pygame/setup.py", line 400, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "buildconfig/config.py", line 241, in main
deps = CFG.main(**kwds)
File "buildconfig/config_darwin.py", line 133, in main
[DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl'])],
File "buildconfig/config_unix.py", line 39, in __init__
self.ver = config[0].strip()
IndexError: list index out of range
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output."
Que dois-je faire s'il vous plaît ???
Merci d'avance et bonne soirée
J'utilise un mac et voulant apprendre a créer des jeux sur python j'ai chercher comment installer le module "Pygame".
Cependant dès que j'entre la commande: "python -m pip install pygame" sur le terminal afin de le télécharger mais j'ai le mesage suivant qui apparaît:
"DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting pygame
Using cached pygame-2.0.3.tar.gz (5.8 MB)
ERROR: Command errored out with exit status 1:
command: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m1/yzm3v_s10gz08cmbkzwmq5l80000gn/T/pip-install-K6SCQL/pygame/setup.py'"'"'; __file__='"'"'/private/var/folders/m1/yzm3v_s10gz08cmbkzwmq5l80000gn/T/pip-install-K6SCQL/pygame/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/m1/yzm3v_s10gz08cmbkzwmq5l80000gn/T/pip-pip-egg-info-OO6FLI
cwd: /private/var/folders/m1/yzm3v_s10gz08cmbkzwmq5l80000gn/T/pip-install-K6SCQL/pygame/
Complete output (27 lines):
WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
Using Darwin configuration...
sh: sdl2-config: command not found
sh: sdl2-config: command not found
sh: sdl2-config: command not found
---
For help with compilation see:
https://www.pygame.org/wiki/MacCompile
To contribute to pygame development see:
https://www.pygame.org/contribute.html
---
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/m1/yzm3v_s10gz08cmbkzwmq5l80000gn/T/pip-install-K6SCQL/pygame/setup.py", line 400, in <module>
buildconfig.config.main(AUTO_CONFIG)
File "buildconfig/config.py", line 241, in main
deps = CFG.main(**kwds)
File "buildconfig/config_darwin.py", line 133, in main
[DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl'])],
File "buildconfig/config_unix.py", line 39, in __init__
self.ver = config[0].strip()
IndexError: list index out of range
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output."
Que dois-je faire s'il vous plaît ???
Merci d'avance et bonne soirée
A voir également:
- Erreur à l'installation de Pygame
- Installation windows 10 sans compte microsoft - Guide
- Installation chromecast - Guide
- Erreur d’installation - 0x80070643 - Accueil - Windows
- Installation calculatrice - Télécharger - Calcul & Conversion
- Erreur 0x80070643 Windows 10 : comment résoudre le problème de la mise à jour KB5001716 - Accueil - Windows
1 réponse
Bonjour,
Existe-t-il une contrainte qui t'oblige à utiliser Python 2.7 ?
OK, Python2 est préinstallé par Apple dans MacOS, mais cette version n'est plus supportée depuis janvier 2020 ("...Python 2.7 reached the end of its life on January 1st, 2020...)
Il est donc fortement conseillé de passer à Python 3 que tu trouveras ici: https://www.python.org/downloads/macos/
Une fois que tu seras passé en Python3, alors tu installeras Pygame ainsi: https://fr.acervolima.com/installer-pygame-sous-macos/
Ritchi
PS: pour toute question Python, il y a un forum dédié à cela où des spécialistes t'aideront bien mieux que moi: https://forums.commentcamarche.net/forum/python-264
Ritchi
Existe-t-il une contrainte qui t'oblige à utiliser Python 2.7 ?
OK, Python2 est préinstallé par Apple dans MacOS, mais cette version n'est plus supportée depuis janvier 2020 ("...Python 2.7 reached the end of its life on January 1st, 2020...)
Il est donc fortement conseillé de passer à Python 3 que tu trouveras ici: https://www.python.org/downloads/macos/
Une fois que tu seras passé en Python3, alors tu installeras Pygame ainsi: https://fr.acervolima.com/installer-pygame-sous-macos/
Ritchi
PS: pour toute question Python, il y a un forum dédié à cela où des spécialistes t'aideront bien mieux que moi: https://forums.commentcamarche.net/forum/python-264
Ritchi