pip install mysql-python 安装错误解决方案

Running setup.py install for mysql-python ... error
ERROR: Command errored out with exit status 1:
command: ‘c:\program files\python\python.exe‘ -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] =
‘"‘"‘C:\\Users\\lin26\\AppData\\Local\\Temp\\pip-install-gpn4j3c1\\mysql-python_4fc8e8e2440d4e86b9373d429b8c6634\\
setup.py‘"‘"‘; __file__=‘"‘"‘C:\\Users\\lin26\\AppData\\Local\\Temp\\pip-install-gpn4j3c1\\mysql-python_4fc8e8e244
0d4e86b9373d429b8c6634\\setup.py‘"‘"‘;f = getattr(tokenize, ‘"‘"‘open‘"‘"‘, open)(__file__) if os.path.exists(__fi
le__) else io.StringIO(‘"‘"‘from setuptools import setup; setup()‘"‘"‘);code = f.read().replace(‘"‘"‘\r\n‘"‘"‘, ‘"
‘"‘\n‘"‘"‘);f.close();exec(compile(code, __file__, ‘"‘"‘exec‘"‘"‘))‘ install --record ‘C:\Users\lin26\AppData\Loca
l\Temp\pip-record-iz_1sfbp\install-record.txt‘ --single-version-externally-managed --user --prefix= --compile --in
stall-headers ‘C:\Users\lin26\AppData\Roaming\Python\Python38\Include\mysql-python‘
cwd: C:\Users\lin26\AppData\Local\Temp\pip-install-gpn4j3c1\mysql-python_4fc8e8e2440d4e86b9373d429b8c6634
\
Complete output (24 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.8
copying _mysql_exceptions.py -> build\lib.win-amd64-3.8
creating build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.8\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.8\MySQLdb
creating build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-3.8\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.8\MySQLdb\constants
running build_ext
building ‘_mysql‘ extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio
.microsoft.com/downloads/

----------------这里是真正错误,去http://go.microsoft.com/fwlink/?LinkId=691126把系统安装一些最新c++框架------------------------------------

----------------------------------------
ERROR: Command errored out with exit status 1: ‘c:\program files\python\python.exe‘ -u -c ‘import io, os, sys, setu
ptools, tokenize; sys.argv[0] = ‘"‘"‘C:\\Users\\lin26\\AppData\\Local\\Temp\\pip-install-gpn4j3c1\\mysql-python_4fc
8e8e2440d4e86b9373d429b8c6634\\setup.py‘"‘"‘; __file__=‘"‘"‘C:\\Users\\lin26\\AppData\\Local\\Temp\\pip-install-gpn
4j3c1\\mysql-python_4fc8e8e2440d4e86b9373d429b8c6634\\setup.py‘"‘"‘;f = getattr(tokenize, ‘"‘"‘open‘"‘"‘, open)(__f
ile__) if os.path.exists(__file__) else io.StringIO(‘"‘"‘from setuptools import setup; setup()‘"‘"‘);code = f.read(
).replace(‘"‘"‘\r\n‘"‘"‘, ‘"‘"‘\n‘"‘"‘);f.close();exec(compile(code, __file__, ‘"‘"‘exec‘"‘"‘))‘ install --record ‘
C:\Users\lin26\AppData\Local\Temp\pip-record-iz_1sfbp\install-record.txt‘ --single-version-externally-managed --use
r --prefix= --compile --install-headers ‘C:\Users\lin26\AppData\Roaming\Python\Python38\Include\mysql-python‘ Check
the logs for full command output.

pip install mysql-python 安装错误解决方案

上一篇:MySQL 事务隔离级别


下一篇:mysql数据库导入导出