错误语法错误:'}'从pip安装mysqlclient时(WINDOWS OS)

时间:2017-06-05 08:51:36

标签: python mysql pip mysql-python

运行pip后安装mysqlclient == 1.3.8。我收到了以下错误,不知道出了什么问题。提前感谢任何帮助。

C:\GoogleCloud\python-flask>pip install mysqlclient==1.3.8
Collecting mysqlclient==1.3.8
  Using cached mysqlclient-1.3.8.tar.gz
Installing collected packages: mysqlclient
  Running setup.py install for mysqlclient ... error
    Complete output from command c:\python27\python.exe -u -c "import setuptools
, tokenize;__file__='c:\\users\\reo~1.bit\\appdata\\local\\temp\\pip-build-gv9rc
o\\mysqlclient\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.rea
d().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" insta
ll --record c:\users\reo~1.bit\appdata\local\temp\pip-ztpibg-record\install-reco
rd.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\compat.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\constan
ts
    copying MySQLdb\constants\CR.py -> build\lib.win32-2.7\MySQLdb\constants
    copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-2.7\MySQLdb\const
ants
    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\constant
s
    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
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo
/Ox /MD /W3 /GS- /DNDEBUG -Dversion_info=(1,3,8,'final',1) -D__version__=1.3.8 "
-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.1\include" -Ic:\python27\incl
ude -Ic:\python27\PC /Tc_mysql.c /Fobuild\temp.win32-2.7\Release\_mysql.obj /Zl
    _mysql.c
    _mysql.c(524) : error C2059: syntax error : '}'
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\BI
N\\cl.exe' failed with exit status 2

    ----------------------------------------

我是python中的新手,想要用flask + mysql学习python。 但是这个错误发生了。有人可以帮忙吗?

0 个答案:

没有答案
相关问题