- 使用用得虚拟环境
- python是3.5的
- 报错信息如下
ERROR: Command errored out with exit status 1:
command: 'd:\programming_language\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ZHUHON~1\\AppData\\Local\\Temp\\pip-install-zrauigfz\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\ZHUHON~1\\AppData\\Local\\Temp\\pip-install-zrauigfz\\mysqlclient\\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\ZHUHON~1\AppData\Local\Temp\pip-wheel-enumbw08' --python-tag cp35
cwd: C:\Users\ZHUHON~1\AppData\Local\Temp\pip-install-zrauigfz\mysqlclient\
Complete output (26 lines):
d:\programming_language\python\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\_exceptions.py -> build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\compat.py -> build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.5\MySQLdb
creating build\lib.win-amd64-3.5\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.5\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.5\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.5\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.5\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.5\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.5\MySQLdb\constants
running build_ext
building 'MySQLdb._mysql' extension
error: Unable to find vcvarsall.bat
----------------------------------------
ERROR: Failed building wheel for mysqlclient
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
ERROR: Command errored out with exit status 1:
command: 'd:\programming_language\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ZHUHON~1\\AppData\\Local\\Temp\\pip-install-zrauigfz\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\ZHUHON~1\\AppData\\Local\\Temp\\pip-install-zrauigfz\\mysqlclient\\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\ZHUHON~1\AppData\Local\Temp\pip-record-dtw798pt\install-record.txt' --single-version-externally-managed --compile
cwd: C:\Users\ZHUHON~1\AppData\Local\Temp\pip-install-zrauigfz\mysqlclient\
Complete output (26 lines):
d:\programming_language\python\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.5
creating build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\_exceptions.py -> build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\compat.py -> build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.5\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.5\MySQLdb
creating build\lib.win-amd64-3.5\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.5\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.5\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.5\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.5\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.5\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.5\MySQLdb\constants
running build_ext
building 'MySQLdb._mysql' extension
error: Unable to find vcvarsall.bat
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\programming_language\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ZHUHON~1\\AppData\\Local\\Temp\\pip-install-zrauigfz\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\ZHUHON~1\\AppData\\Local\\Temp\\pip-install-zrauigfz\\mysqlclient\\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\ZHUHON~1\AppData\Local\Temp\pip-record-dtw798pt\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.