mysqlpython出现pip安装错误,无法正常工作

2024-09-28 21:40:33 发布

您现在位置:Python中文网/ 问答频道 /正文

我尝试使用pip install mysql python命令,得到以下错误。我不知道这意味着什么,请帮帮我。我已经更新了我的pip版本和setuptools和wheels,所以我不知所措。我收到了一个很大的错误消息,但只有前半部分显示在下面。在

 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

Tags: pybuildlibmysqlwinusersamd64computer