失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > pip mysql出错_为什么我运行pip install MySQLPython时出错?

pip mysql出错_为什么我运行pip install MySQLPython时出错?

时间:2023-11-21 14:48:27

相关推荐

pip mysql出错_为什么我运行pip install MySQLPython时出错?

我拼命想建立django,但还是不断遇到问题。我的问题是,当我运行“pip install MySQL python”时,我遇到了一堵红色的文本和我无法理解的错误。任何事都值得感激。我不能安装django,这是我关于堆栈溢出的第一篇文章,所以如果我弄乱了任何格式,请对我很简单。我没有编码经验,事实上,我甚至不能让这样的基本东西工作是非常令人沮丧的。在C:\WINDOWS\system32>pip install MySQL-python

Collecting MySQL-python

Using cached

/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip

Building wheels for collected packages: MySQL-python

Building wheel for MySQL-python (setup.py) ... error

ERROR: Command errored out with exit status 1:

command: 'c:\users\chrispa\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Chrispa\\AppData\\Local\\Temp\\pip-install-ts0ir3mr\\MySQL-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\Chrispa\\AppData\\Local\\Temp\\pip-install-ts0ir3mr\\MySQL-python\\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\Chrispa\AppData\Local\Temp\pip-wheel-4pjpg8hv' --python-tag cp37

cwd: C:\Users\Chrispa\AppData\Local\Temp\pip-install-ts0ir3mr\MySQL-python\

Complete output (29 lines):

running bdist_wheel

running build

running build_py

creating build

creating build\lib.win32-3.7

copying _mysql_exceptions.py -> build\lib.win32-3.7

creating build\lib.win32-3.7\MySQLdb

copying MySQLdb\__init__.py -> build\lib.win32-3.7\MySQLdb

copying MySQLdb\converters.py -> build\lib.win32-3.7\MySQLdb

copying MySQLdb\connections.py -> build\lib.win32-3.7\MySQLdb

copying MySQLdb\cursors.py -> build\lib.win32-3.7\MySQLdb

copying MySQLdb\release.py -> build\lib.win32-3.7\MySQLdb

copying MySQLdb\times.py -> build\lib.win32-3.7\MySQLdb

creating build\lib.win32-3.7\MySQLdb\constants

copying MySQLdb\constants\__init__.py -> build\lib.win32-3.7\MySQLdb\constants

copying MySQLdb\constants\CR.py -> build\lib.win32-3.7\MySQLdb\constants

copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.7\MySQLdb\constants

copying MySQLdb\constants\ER.py -> build\lib.win32-3.7\MySQLdb\constants

copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.7\MySQLdb\constants

copying MySQLdb\constants\REFRESH.py -> build\lib.win32-3.7\MySQLdb\constants

copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.7\MySQLdb\constants

running build_ext

building '_mysql' extension

creating build\temp.win32-3.7

creating build\temp.win32-3.7\Release

C:\Program Files (x86)\Microsoft Visual Studio\\Community\VC\Tools\MSVC\14.22.27905\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\include" -Ic:\users\chrispa\appdata\local\programs\python\python37-32\include -Ic:\users\chrispa\appdata\local\programs\python\python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\\Community\VC\Tools\MSVC\14.22.27905\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\\Community\VC\Tools\MSVC\14.22.27905\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.7.2\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tc_mysql.c /Fobuild\temp.win32-3.7\Release\_mysql.obj /Zl

_mysql.c

_mysql.c(42): fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\\\Community\\VC\\Tools\\MSVC\\14.22.27905\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2

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

ERROR: Failed building wheel for MySQL-python

Running setup.py clean for MySQL-python

Failed to build MySQL-python

Installing collected packages: MySQL-python

Running setup.py install for MySQL-python ... error

ERROR: Command errored out with exit status 1:

command: 'c:\users\chrispa\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Chrispa\\AppData\\Local\\Temp\\pip-install-ts0ir3mr\\MySQL-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\Chrispa\\AppData\\Local\\Temp\\pip-install-ts0ir3mr\\MySQL-python\\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\Chrispa\AppData\Local\Temp\pip-record-wedev03m\install-record.txt' --single-version-externally-managed --compile

cwd: C:\Users\Chrispa\AppData\Local\Temp\pip-install-ts0ir3mr\MySQL-python\

Complete output (29 lines):

running install

running build

running build_py

creating build

creating build\lib.win32-3.7

copying _mysql_exceptions.py -> build\lib.win32-3.7

creating build\lib.win32-3.7\MySQLdb

copying MySQLdb\__init__.py -> build\lib.win32-3.7\MySQLdb

copying MySQLdb\converters.py -> build\lib.win32-3.7\MySQLdb

copying MySQLdb\connections.py -> build\lib.win32-3.7\MySQLdb

copying MySQLdb\cursors.py -> build\lib.win32-3.7\MySQLdb

copying MySQLdb\release.py -> build\lib.win32-3.7\MySQLdb

copying MySQLdb\times.py -> build\lib.win32-3.7\MySQLdb

creating build\lib.win32-3.7\MySQLdb\constants

copying MySQLdb\constants\__init__.py -> build\lib.win32-3.7\MySQLdb\constants

copying MySQLdb\constants\CR.py -> build\lib.win32-3.7\MySQLdb\constants

copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.7\MySQLdb\constants

copying MySQLdb\constants\ER.py -> build\lib.win32-3.7\MySQLdb\constants

copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.7\MySQLdb\constants

copying MySQLdb\constants\REFRESH.py -> build\lib.win32-3.7\MySQLdb\constants

copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.7\MySQLdb\constants

running build_ext

building '_mysql' extension

creating build\temp.win32-3.7

creating build\temp.win32-3.7\Release

C:\Program Files (x86)\Microsoft Visual Studio\\Community\VC\Tools\MSVC\14.22.27905\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2\include" -Ic:\users\chrispa\appdata\local\programs\python\python37-32\include -Ic:\users\chrispa\appdata\local\programs\python\python37-32\include "-IC:\Program Files (x86)\Microsoft Visual Studio\\Community\VC\Tools\MSVC\14.22.27905\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\\Community\VC\Tools\MSVC\14.22.27905\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.7.2\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tc_mysql.c /Fobuild\temp.win32-3.7\Release\_mysql.obj /Zl

_mysql.c

_mysql.c(42): fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory

error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\\\Community\\VC\\Tools\\MSVC\\14.22.27905\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2

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

ERROR: Command errored out with exit status 1: 'c:\users\chrispa\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Chrispa\\AppData\\Local\\Temp\\pip-install-ts0ir3mr\\MySQL-python\\setup.py'"'"'; __file__='"'"'C:\\Users\\Chrispa\\AppData\\Local\\Temp\\pip-install-ts0ir3mr\\MySQL-python\\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\Chrispa\AppData\Local\Temp\pip-record-wedev03m\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

如果觉得《pip mysql出错_为什么我运行pip install MySQLPython时出错?》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。