pip install -r requirements.txt之后发生了这个情况怎么办

来源:4-9 打造高可用flask mvc框架

慕村8255970

2019-05-03

ERROR: Complete output from command ‘C:\Users\msii\AppData\Local\Programs\Python\Python35\python.exe’ -u -c ‘import setuptools, tokenize;file=
’"’"‘C:\Users\msii\AppData\Local\Temp\pip-install-2w0dwi57\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\msii\AppData\Local
Temp\pip-record-dn9oi_w1\install-record.txt’ --single-version-externally-managed --compile:
ERROR: C:\Users\msii\AppData\Local\Programs\Python\Python35\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 “‘C:\Users\msii\AppData\Local\Programs\Python\Python35\python.exe’ -u -c ‘import setuptools, tokenize;file=’”’"‘C:\Users\msii\Ap
pData\Local\Temp\pip-install-2w0dwi57\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\msii\AppData\Local\Temp\pip-record-dn9oi_w1
\install-record.txt’ --single-version-externally-managed --compile" failed with error code 1 in C:\Users\msii\AppData\Local\Temp\pip-install-2w0dwi57
mysqlclient\

写回答

1回答

编程浪子

2019-05-03

你好

使用windows10,终端pip install mysqlclient ,可能安装不了mysqlclient这个库的,需要在https://pypi.org/project/mysqlclient/#files中下载相应系统的whl文件 。然后pip install 下载的whl文件


0
0

Python Flask构建微信小程序订餐系统(可用于毕设)

微信小程序 + Python Flask 打造订餐系统全栈应用,可用于毕设。

1709 学习 · 1904 问题

查看课程