python - mysql-python的pip安装错误无法正常工作

我正在尝试使用pip install mysql-python命令,但出现以下错误。我不知道这意味着有人请帮助。我已经更新了pip和setuptools和wheel的版本,所以我很茫然。我收到一个很大的错误消息,但下面仅显示前半部分。

 C:\Users\Alex\Desktop\Cornell Stuff\Computer Programs\WinPython-64bit-
 3.4.3.3\python-3.4.3.amd64>pip install mysql-python
 Collecting mysql-python
   Downloading MySQL-python-1.2.5.zip (108kB)
     100% |################################| 112kB 179kB/s
 Building wheels for collected packages: mysql-python
   Running setup.py bdist_wheel for mysql-python ... error
   Complete output from command "C:\Users\Alex\Desktop\Cornell Stuff\Computer 
 Programs\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\python.exe" -u -c 
 "import setuptools, 
 tokenize;__file__='C:\\Users\\Alex\\AppData\\Local\\Temp\\pip-build-
 1kxb8j7_\\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\Alex\AppData\Local\Temp\tmpzz01n6ylpip-wheel- --python-tag cp34:
   running bdist_wheel
   running build
   running build_py
   creating build
   creating build\lib.win-amd64-3.4
   copying _mysql_exceptions.py -> build\lib.win-amd64-3.4
   creating build\lib.win-amd64-3.4\MySQLdb
   copying MySQLdb\__init__.py -> build\lib.win-amd64-3.4\MySQLdb
   copying MySQLdb\converters.py -> build\lib.win-amd64-3.4\MySQLdb
   copying MySQLdb\connections.py -> build\lib.win-amd64-3.4\MySQLdb
   copying MySQLdb\cursors.py -> build\lib.win-amd64-3.4\MySQLdb
   copying MySQLdb\release.py -> build\lib.win-amd64-3.4\MySQLdb
   copying MySQLdb\times.py -> build\lib.win-amd64-3.4\MySQLdb
   creating build\lib.win-amd64-3.4\MySQLdb\constants
   copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-
 3.4\MySQLdb\constants
   copying MySQLdb\constants\CR.py -> build\lib.win-amd64-
 3.4\MySQLdb\constants
   copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-
 3.4\MySQLdb\constants
   copying MySQLdb\constants\ER.py -> build\lib.win-amd64-
 3.4\MySQLdb\constants
   copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-
 3.4\MySQLdb\constants
   copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-
 3.4\MySQLdb\constants
   copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-
 3.4\MySQLdb\constants
   running build_ext
   building '_mysql' extension
   creating build\temp.win-amd64-3.4
   creating build\temp.win-amd64-3.4\Release
   C:\Users\Alex\Desktop\Cornell Stuff\Computer Programs\WinPython-64bit-
 3.4.3.3\python-3.4.3.amd64\..\tools\mingw32\bin\gcc.exe -mdll -O -DMS_WIN64 
 -Wall -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\Alex\Desktop\Cornell Stuff\Computer Programs\WinPython-64bit-
 3.4.3.3\python-3.4.3.amd64\include" "-IC:\Users\Alex\Desktop\Cornell 
 Stuff\Computer Programs\WinPython-64bit-3.4.3.3\python-3.4.3.amd64\include" 
 -c _mysql.c -o build\temp.win-amd64-3.4\Release\_mysql.o /Zl
   gcc: error: /Zl: No such file or directory
   error: command 'C:\\Users\\Alex\\Desktop\\Cornell Stuff\\Computer 
 Programs\\WinPython-64bit-3.4.3.3\\python-
 3.4.3.amd64\\..\\tools\\mingw32\\bin\\gcc.exe' failed with exit status 1

   ----------------------------------------
   Failed building wheel for mysql-python
   Running setup.py clean for mysql-python
   Failed to build mysql-python

最佳答案

那里写着mysql-python可能不兼容python-3:https://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python

您可能想尝试一下,例如:“pip install mysql-connector-python”

https://stackoverflow.com/questions/48046440/

相关文章:

python - 使用 MinGW+GCC 编译 SciPy 时编译器失败

c - 使用指针的程序运行不正常

c++ - 在此范围C++中未声明错误 'menu'

c# - C#中的编译时错误

c# - 如何正确地将 Dictionary,Object

delphi - delphi编译错误 "[DCC Error] ProjectName.dpr([

.net - 使用xmlrpc和vb.net在wordpress中发布错误

c++ - 我的程序未发现struct中的功能

php - PHP中 undefined index 错误

c++ - LNK2019未解析的外部符号。创建二叉树