Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/348.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 尝试pip安装mysqlclient,但出现错误_Python - Fatal编程技术网

Python 尝试pip安装mysqlclient,但出现错误

Python 尝试pip安装mysqlclient,但出现错误,python,Python,我是python新手。我正在尝试设置环境以构建图片共享应用程序。在我不得不安装mysqlclient之前,安装一直进行得很顺利,根据我使用的教程,这是一项要求 我在windows Powershell中遇到的错误如下: --compile: running install running build running build_py creating build creating build\lib.win-amd64-3.7 copying _mysql_exceptions.py ->

我是python新手。我正在尝试设置环境以构建图片共享应用程序。在我不得不安装mysqlclient之前,安装一直进行得很顺利,根据我使用的教程,这是一项要求

我在windows Powershell中遇到的错误如下:

--compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying _mysql_exceptions.py -> build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\MySQLdb
copying MySQLdb\__init__.py -> build\lib.win-amd64-3.7\MySQLdb
copying MySQLdb\compat.py -> build\lib.win-amd64-3.7\MySQLdb
copying MySQLdb\connections.py -> build\lib.win-amd64-3.7\MySQLdb
copying MySQLdb\converters.py -> build\lib.win-amd64-3.7\MySQLdb
copying MySQLdb\cursors.py -> build\lib.win-amd64-3.7\MySQLdb
copying MySQLdb\release.py -> build\lib.win-amd64-3.7\MySQLdb
copying MySQLdb\times.py -> build\lib.win-amd64-3.7\MySQLdb
creating build\lib.win-amd64-3.7\MySQLdb\constants
copying MySQLdb\constants\__init__.py -> build\lib.win-amd64-3.7\MySQLdb\constants
copying MySQLdb\constants\CLIENT.py -> build\lib.win-amd64-3.7\MySQLdb\constants
copying MySQLdb\constants\CR.py -> build\lib.win-amd64-3.7\MySQLdb\constants
copying MySQLdb\constants\ER.py -> build\lib.win-amd64-3.7\MySQLdb\constants
copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win-amd64-3.7\MySQLdb\constants
copying MySQLdb\constants\FLAG.py -> build\lib.win-amd64-3.7\MySQLdb\constants
copying MySQLdb\constants\REFRESH.py -> build\lib.win-amd64-3.7\MySQLdb\constants
running build_ext
building '_mysql' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
<>我已经在我的机器上安装了微软Visual C++ 14 我甚至尝试过升级安装工具,就像在另一篇文章中建议的那样,但没有成功 我已经安装了python 3.7

试试这个

 pip install --only-binary :all: mysqlclient
希望有帮助。

这可能会有帮助