gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 11:14:49 26 4
gpt4 key购买 nike

我正在尝试使用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”

关于python - mysql-python的pip安装错误无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48046440/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com