2017-01-24 5 views
0

essayez d'installer mysql-pythonAvoir une erreur « erreur: commande « cl.exe » a échoué: Aucun fichier ou répertoire »

C:\Users\Одиночка>pip install mysql-python 
Collecting mysql-python 
    Using cached MySQL-python-1.2.5.zip 
Installing collected packages: mysql-python 
    Running setup.py install for mysql-python ... error 
    Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\2871~1\\appdata\\local\\temp\\pip-build-lyj5ba\\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\2871~1\appdata\local\temp\pip-y0f9do-record\install-record.txt --single-version-externally-managed --compile: 
    running install 
    running build 
    running build_py 
    creating build 
    creating build\lib.win32-2.7 
    copying _mysql_exceptions.py -> build\lib.win32-2.7 
    creating build\lib.win32-2.7\MySQLdb 
    copying MySQLdb\__init__.py -> build\lib.win32-2.7\MySQLdb 
    copying MySQLdb\converters.py -> build\lib.win32-2.7\MySQLdb 
    copying MySQLdb\connections.py -> build\lib.win32-2.7\MySQLdb 
    copying MySQLdb\cursors.py -> build\lib.win32-2.7\MySQLdb 
    copying MySQLdb\release.py -> build\lib.win32-2.7\MySQLdb 
    copying MySQLdb\times.py -> build\lib.win32-2.7\MySQLdb 
    creating build\lib.win32-2.7\MySQLdb\constants 
    copying MySQLdb\constants\__init__.py -> build\lib.win32-2.7\MySQLdb\constants 
    copying MySQLdb\constants\CR.py -> build\lib.win32-2.7\MySQLdb\constants 
    copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-2.7\MySQLdb\constants 
    copying MySQLdb\constants\ER.py -> build\lib.win32-2.7\MySQLdb\constants 
    copying MySQLdb\constants\FLAG.py -> build\lib.win32-2.7\MySQLdb\constants 
    copying MySQLdb\constants\REFRESH.py -> build\lib.win32-2.7\MySQLdb\constants 
    copying MySQLdb\constants\CLIENT.py -> build\lib.win32-2.7\MySQLdb\constants 
    running build_ext 
    building '_mysql' extension 
    creating build\temp.win32-2.7 
    creating build\temp.win32-2.7\Release 
    cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\include" -Ic:\python27\include -Ic:\python27\PC /Tc_mysql.c /Fobuild\temp.win32-2.7\Release\_mysql.obj /Zl 
    error: command 'cl.exe' failed: No such file or directory 
+0

peut-être que c'est en fonction de certains logiciels vous Cela ne ressemble pas à un composant Visual Studio, donc vous devrez peut-être l'installer en premier.Pas de compilateur = Ne va pas se produire – tadman

+0

Le système a obtenu ce fichier sur le chemin C: \ Pro gram Fichiers (x86) \ Microsoft Visual Studio 14.0 \ VC \ bin "" –

+0

Il est clair qu'il ne l'aurait pas sinon trouver 'cl.exe'. – tadman

Répondre

1

Je l'ai rencontré ce problème aussi. Et j'ai essayé les méthodes énumérées dans Internet et ne fonctionne pas. Installez Microsoft Visual Studio avec cl.exe dans l'ordinateur ou ajoutez C: \ Program Files (x86) \ Microsoft Visual Studio 14.0 \ VC \ bin "à PATH, mais cela ne fonctionne pas pour moi. du mesg d'erreur:.

error: command 'cl.exe' failed: No such file or directory
.---------------------------------------- Failed building wheel for Twisted Running setup.py clean for Twisted Failed to build Twisted

il a mentionné Twisted, donc j'installer Twisted premier et il a travaillé vous pouvez installer la version correcte de Twisted en lien ci-dessous: Unofficial Windows Binaries for Python Extension Packages