错误:Windows 10的mysqlclient的构建轮失败

时间:2020-11-02 08:22:22

标签: mysql

C:\Users\Akshay\PycharmProjects>pip install mysqlclient
    Collecting mysqlclient
      Using cached mysqlclient-2.0.1.tar.gz (87 kB)
    Building wheels for collected packages: mysqlclient
      Building wheel for mysqlclient (setup.py) ... error
      ERROR: Command errored out with exit status 1:
       command: 'c:\users\akshay\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Akshay\\AppData\\Local\\Temp\\pip-install-hhw69sra\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\Akshay\\AppData\\Local\\Temp\\pip-install-hhw69sra\\mysqlclient\\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\Akshay\AppData\Local\Temp\pip-wheel-x_id5m86'
    cwd: C:\Users\Akshay\AppData\Local\Temp\pip-install-hhw69sra\mysqlclient\
      Complete output (23 lines):
      running bdist_wheel
      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
      running build_ext
      building 'MySQLdb._mysql' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      ----------------------------------------
      ERROR: Failed building wheel for mysqlclient
      Running setup.py clean for mysqlclient
    Failed to build mysqlclient
    Installing collected packages: mysqlclient
        Running setup.py install for mysqlclient ... error
        ERROR: Command errored out with exit status 1:
         command: 'c:\users\akshay\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Akshay\\AppData\\Local\\Temp\\pip-install-hhw69sra\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\Akshay\\AppData\\Local\\Temp\\pip-install-hhw69sra\\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\Akshay\AppData\Local\Temp\pip-record-kh5vz2_g\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\akshay\appdata\local\programs\python\python38-32\Include\mysqlclient'
             cwd: C:\Users\Akshay\AppData\Local\Temp\pip-install-hhw69sra\mysqlclient\
        Complete output (23 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
        running build_ext
        building 'MySQLdb._mysql' extension
        error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
        ----------------------------------------
    ERROR: Command errored out with exit status 1: 'c:\users\akshay\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Akshay\\AppData\\Local\\Temp\\pip-install-hhw69sra\\mysqlclient\\setup.py'"'"'; __file__='"'"'C:\\Users\\Akshay\\AppData\\Local\\Temp\\pip-install-hhw69sra\\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\Akshay\AppData\Local\Temp\pip-record-kh5vz2_g\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\akshay\appdata\local\programs\python\python38-32\Include\mysqlclient' Check the logs for full command output.

0 个答案:

没有答案