Pygame installation de Python 3.6.0
J'ai été en utilisant Python 3.5.2 avec Pygame 1.9.2 et tout fonctionnait bien. Alors j'ai décidé d'essayer la version récente de Python 3.6.0 avec une nouvelle installation, mais quand j'ai essayé de réinstaller Pygame:
pip install pygame
il a renvoyé l'suivantes:
Collecting pygame
Downloading pygame-1.9.2.tar.gz (3.0MB)
100% |████████████████████████████████| 3.0MB 292kB/s
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".
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\rodri\AppData\Local\Temp\pip-build-328x7lme\pygame\setup.py", line 165, in <module>
extensions = read_setup_file('Setup')
File "c:\python\lib\distutils\extension.py", line 171, in read_setup_file
line = expand_makefile_vars(line, vars)
File "c:\python\lib\distutils\sysconfig.py", line 410, in expand_makefile_vars
s = s[0:beg] + vars.get(m.group(1)) + s[end:]
TypeError: must be str, not NoneType
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\rodri\AppData\Local\Temp\pip-build-328x7lme\pygame\
OriginalL'auteur Rodrigo Nascimento | 2016-12-31
Vous devez vous connecter pour publier un commentaire.
J'ai résolu ce problème en utilisant la commande:
et puis téléchargé
pygame‑1.9.2‑cp36‑cp36m‑win_amd64.whl
de ici (je suis sur un Windows 64 bits). J'ai copié le fichier sur mon Python dossier, puis utiliséet cela a fonctionné.
OriginalL'auteur Rodrigo Nascimento
J'ai récemment installé PyGame et PyQt5 sur un ensemble de machines Windows à l'école. J'ai désinstallé l'existant (2.4) Python. Ensuite, j'ai utilisé le programme d'installation à partir de Python.org pour 3.6.1. J'ai coché la case pour mettre Python dans le CHEMIN d'accès et utilisé l'option d'installation personnalisée pour installer pour tous les utilisateurs. Qui a bien fonctionné.
Puis de l'installer pygame et PyQt5 j'ai simplement ouvert une Invite de Commande Windows (en tant qu'administrateur) et a couru
"pip3 installer pygame" et puis
"pip3 installer pyqt5"
Ils ont travaillé tous deux beaux et l'ensemble de l'installation fonctionne bien ensemble.
OriginalL'auteur Tim