[在xampp中使用pip安装mysql时如何解决此问题[重复]

问题描述 投票:-1回答:1
运行命令:-pip安装mysql当我使用pip在xampp中安装mysql时出现错误。以及如何使用pip安装mysql?在哪里安装mysql我很想解决这个问题,请给我正确的解决方法]

E:\xampp\Python\Scripts>pip install mysql Collecting mysql Using cached mysql-0.0.2.tar.gz (1.9 kB) Collecting mysqlclient Using cached mysqlclient-1.4.6.tar.gz (85 kB) Installing collected packages: mysqlclient, mysql Running setup.py install for mysqlclient ... error ERROR: Command errored out with exit status 1: command: 'e:\xampp\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Rakesh\\AppData\\Local\\Temp\\pip-install-z1tn9j9l\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\Rakesh\\AppData\\Local\\Temp\\pip-install-z1tn9j9l\\mysqlclient\\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\Rakesh\AppData\Local\Temp\pip-record-034p88rc\install-record.txt' --single-version-externally-managed --compile --install-headers 'e:\xampp\python\Include\mysqlclient' cwd: C:\Users\Rakesh\AppData\Local\Temp\pip-install-z1tn9j9l\mysqlclient\ Complete output (24 lines): running install running build running build_py creating build creating build\lib.win32-3.8 creating build\lib.win32-3.8\MySQLdb copying MySQLdb\__init__.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\_exceptions.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\compat.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\connections.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\converters.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\cursors.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\release.py -> build\lib.win32-3.8\MySQLdb copying MySQLdb\times.py -> build\lib.win32-3.8\MySQLdb creating build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\__init__.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\CR.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\ER.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.8\MySQLdb\constants copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.8\MySQLdb\constants running build_ext building 'MySQLdb._mysql' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/ ---------------------------------------- ERROR: Command errored out with exit status 1: 'e:\xampp\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Rakesh\\AppData\\Local\\Temp\\pip-install-z1tn9j9l\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\Rakesh\\AppData\\Local\\Temp\\pip-install-z1tn9j9l\\mysqlclient\\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\Rakesh\AppData\Local\Temp\pip-record-034p88rc\install-record.txt' --single-version-externally-managed --compile --install-headers 'e:\xampp\python\Include\mysqlclient' Check the logs for full command output.

python mysql pip xampp install
1个回答
0
投票
确定您需要pip的'mysql'软件包,而不是以下软件包:

pip install mysql-connector

© www.soinside.com 2019 - 2024. All rights reserved.