Bonjour,

Je suis débutant en Python, je fais déja au php mais vraiment de manière sauvage.
Je voudrais faire des choses mieux structurées en POO.
J'ai lu ce tuto : https://python.developpez.com/cours/TutoSwinnen/
J'ai installé PyScripter et j'ai essayé quelque programme avec tkinter.

Maintenant j'aimerai installé la librairie MySQLdb mais je bute un peu.
J'en suis la : https://python.developpez.com/cours/...age_18#L16.3.2

J'ai essayé d'installer mysql-python avec "install package with pip", j'obtiens ceci :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Ligne de commande: C:\Python27\python.exe C:\Python27\Lib\site-packages\pip install mysql-python
Réperoire de travail:
Temps écoulé: 0 ms
 
Collecting mysql-python
  Using cached MySQL-python-1.2.5.zip
Building wheels for collected packages: mysql-python
  Running setup.py bdist_wheel for mysql-python: started
  Running setup.py bdist_wheel for mysql-python: finished with status 'error'
  Complete output from command C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\jum\\appdata\\local\\temp\\pip-build-8bqnmy\\mysql-python\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d c:\users\jum\appdata\local\temp\tmplsxvwvpip-wheel- --python-tag cp27:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
 
  error: invalid command 'bdist_wheel'
 
  ----------------------------------------
  Failed building wheel for mysql-python
  Running setup.py clean for mysql-python
Failed to build mysql-python
Installing collected packages: mysql-python
  Running setup.py install for mysql-python: started
    Running setup.py install for mysql-python: finished with status 'error'
    Complete output from command C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\jum\\appdata\\local\\temp\\pip-build-8bqnmy\\mysql-python\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\jum\appdata\local\temp\pip-7eixbv-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-2.7
    copying _mysql_exceptions.py -> build\lib.win-amd64-2.7
    creating build\lib.win-amd64-2.7\MySQLdb
    copying MySQLdb\__init__.py -> build\lib.win-amd64-2.7\MySQLdb
    copying MySQLdb\converters.py -> build\lib.win-amd64-2.7\MySQLdb
    copying MySQLdb\connections.py -> build\lib.win-amd64-2.7\MySQLdb
    copying MySQLdb\cursors.py -> build\lib.win-amd64-2.7\MySQLdb
    copying MySQLdb\release.py -> build\lib.win-amd64-2.7\MySQLdb
    copying MySQLdb\times.py -> build\lib.win-amd64-2.7\MySQLdb
    creating build\lib.win-amd64-2.7\MySQLdb\constants
    copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-2.7\MySQLdb\constants
    copying MySQLdb\constants\CR.py -> build\lib.win-amd64-2.7\MySQLdb\constants
    copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-2.7\MySQLdb\constants
    copying MySQLdb\constants\ER.py -> build\lib.win-amd64-2.7\MySQLdb\constants
    copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-2.7\MySQLdb\constants
    copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-2.7\MySQLdb\constants
    copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-2.7\MySQLdb\constants
    running build_ext
    building '_mysql' extension
    error: Microsoft Visual C++ 9.0 is required. Get it from http://aka.ms/vcpython27
 
    ----------------------------------------
Command "C:\Python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\jum\\appdata\\local\\temp\\pip-build-8bqnmy\\mysql-python\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\jum\appdata\local\temp\pip-7eixbv-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\jum\appdata\local\temp\pip-build-8bqnmy\mysql-python\
 
Le processus "Install Packages with pip" est terminé, code de sortie: 00000001