如何下载Flask-MySQLdb

问题描述

我目前正在以初学者的身份下载Flask -MysqLdb来处理登录系统项目,但是当我尝试安装它时,它一直给我这个错误,我不知道如何解决。 / p>

Collecting Flask-MysqLdb
  Using cached Flask-MysqLdb-0.2.0.tar.gz (2.1 kB)
Requirement already satisfied: Flask>=0.10 in c:\users\고명수\pycharmprojects\myeongsoopython\venv\lib\site-packages (from Flask-MysqLdb) (1.1.2)
Collecting MysqLclient
  Using cached MysqLclient-2.0.1.tar.gz (87 kB)
Requirement already satisfied: itsdangerous>=0.24 in c:\users\고명수\pycharmprojects\myeongsoopython\venv\lib\site-packages (from Flask>=0.10->Flask-MysqLdb) (1.1.0)
Requirement already satisfied: Werkzeug>=0.15 in c:\users\고명수\pycharmprojects\myeongsoopython\venv\lib\site-packages (from Flask>=0.10->Flask-MysqLdb) (1.0.1)
Requirement already satisfied: click>=5.1 in c:\users\고명수\pycharmprojects\myeongsoopython\venv\lib\site-packages (from Flask>=0.10->Flask-MysqLdb) (7.1.2)
Requirement already satisfied: Jinja2>=2.10.1 in c:\users\고명수\pycharmprojects\myeongsoopython\venv\lib\site-packages (from Flask>=0.10->Flask-MysqLdb) (2.11.2)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\고명수\pycharmprojects\myeongsoopython\venv\lib\site-packages (from Jinja2>=2.10.1->Flask>=0.10->Flask-MysqLdb) (1.1.1)
Using legacy setup.py install for Flask-MysqLdb,since package 'wheel' is not installed.
Using legacy setup.py install for MysqLclient,since package 'wheel' is not installed.
Installing collected packages: MysqLclient,Flask-MysqLdb
    Running setup.py install for MysqLclient: started
    Running setup.py install for MysqLclient: finished with status 'error'

    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\고명수\PycharmProjects\MyeongsooPython\venv\Scripts\python.exe' -u -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'C:\\Users\\고명수\\AppData\\Local\\Temp\\pycharm-packaging\\MysqLclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\고명수\\AppData\\Local\\Temp\\pycharm-packaging\\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\고명수\AppData\Local\Temp\pip-record-_h_9brc2\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\고명수\PycharmProjects\MyeongsooPython\venv\include\site\python3.8\MysqLclient'
         cwd: C:\Users\고명수\AppData\Local\Temp\pycharm-packaging\MysqLclient\
    Complete output (25 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\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
    warning: build_py: byte-compiling is disabled,skipping.
    
    running build_ext
    building 'MysqLdb._MysqL' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\고명수\PycharmProjects\MyeongsooPython\venv\Scripts\python.exe' -u -c 'import sys,'"'"'exec'"'"'))' install --record 'C:\Users\고명수\AppData\Local\Temp\pip-record-_h_9brc2\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\고명수\PycharmProjects\MyeongsooPython\venv\include\site\python3.8\MysqLclient' Check the logs for full command output.
WARNING: You are using pip version 20.1.1; however,version 20.2.2 is available.
You should consider upgrading via the 'C:\Users\고명수\PycharmProjects\MyeongsooPython\venv\Scripts\python.exe -m pip install --upgrade pip' command.

好吧,该消息建议将pip升级到最新版本,所以我尝试了一下,但它再次给了我这个错误

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)