2015-09-25 136 views
4

這是我在嘗試安裝mysqlclient時得到的錯誤。我正在使用Windows和python 3.5。我嘗試了所有在stackoverflow上給出的方法,但仍然沒有。無法在Windows上安裝python mysqlclient

Installing 'mysqlclient' 
Collecting mysqlclient 
    Using cached mysqlclient-1.3.6.tar.gz 
Installing collected packages: mysqlclient 
    Running setup.py install for mysqlclient 
    Complete output from command "c:\users\buccaneer\documents\visual studio   2013\Projects\del1\del1\envrm\Scripts\python.exe" -c "import setuptools, tokenize;__file__='C:\\Users\\BUCCAN~1\\AppData\\Local\\Temp\\pip-build-wuhkxhu3\\mysqlclient\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\BUCCAN~1\AppData\Local\Temp\pip-3jbluuk2-record\install-record.txt --single-version-externally-managed --compile --install-headers "c:\users\buccaneer\documents\visual studio 2013\Projects\del1\del1\envrm\include\site\python3.5\mysqlclient": 
running install 
running build 
running build_py 
creating build 
creating build\lib.win32-3.5 
copying _mysql_exceptions.py -> build\lib.win32-3.5 
creating build\lib.win32-3.5\MySQLdb 
copying MySQLdb\__init__.py -> build\lib.win32-3.5\MySQLdb 
copying MySQLdb\compat.py -> build\lib.win32-3.5\MySQLdb 
copying MySQLdb\converters.py -> build\lib.win32-3.5\MySQLdb 
copying MySQLdb\connections.py -> build\lib.win32-3.5\MySQLdb 
copying MySQLdb\cursors.py -> build\lib.win32-3.5\MySQLdb 
copying MySQLdb\release.py -> build\lib.win32-3.5\MySQLdb 
copying MySQLdb\times.py -> build\lib.win32-3.5\MySQLdb 
creating build\lib.win32-3.5\MySQLdb\constants 
copying MySQLdb\constants\__init__.py -> build\lib.win32-3.5\MySQLdb\constants 
copying MySQLdb\constants\CR.py -> build\lib.win32-3.5\MySQLdb\constants 
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.5\MySQLdb\constants 
copying MySQLdb\constants\ER.py -> build\lib.win32-3.5\MySQLdb\constants 
copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.5\MySQLdb\constants 
copying MySQLdb\constants\REFRESH.py -> build\lib.win32-3.5\MySQLdb\constants 
copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.5\MySQLdb\constants 
running build_ext 
building '_mysql' extension 
error: Unable to find vcvarsall.bat 
+0

也許重複http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat – Shine

+1

@Shine沒有它的不復制。在python3.5中似乎有mysqlclient的問題。 –

回答

4

mysqlclient目前說它支持Python 2.7,3.3-3.4。

我會嘗試使用Python 3.4。 Python 3.5最近才被髮布。

如果它在3.4而不是3.5上工作,那麼你可以在項目的GitHub頁面上使用open an issue

+0

是的..它似乎與p3.4,但不與3.5。謝謝。 :) –

+2

爲了將來的參考,OP打開[this issue](https://github.com/PyMySQL/mysqlclient-python/issues/54)。 – Alasdair