pip install error when

Because of the need mysqlclient this module, but when an error in pip

Collecting mysqlclient
  Using cached https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz
Building wheels for collected packages: mysqlclient
  Building wheel for mysqlclient (setup.py) ... error
  ERROR: Complete output from command 'c:\users\libo3\appdata\local\programs\python\python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\libo3\\AppData\\Local\\Temp\\pip-install-dx_ukroi\\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\libo3\AppData\Local\Temp\pip-wheel-rh1vf72j' --python-tag cp37:
  ERROR: running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win32-3.7
  creating build\lib.win32-3.7\MySQLdb
  copying MySQLdb\__init__.py -> build\lib.win32-3.7\MySQLdb
  copying MySQLdb\_exceptions.py -> build\lib.win32-3.7\MySQLdb
  copying MySQLdb\compat.py -> build\lib.win32-3.7\MySQLdb
  copying MySQLdb\connections.py -> build\lib.win32-3.7\MySQLdb
  copying MySQLdb\converters.py -> build\lib.win32-3.7\MySQLdb
  copying MySQLdb\cursors.py -> build\lib.win32-3.7\MySQLdb
  copying MySQLdb\release.py -> build\lib.win32-3.7\MySQLdb
  copying MySQLdb\times.py -> build\lib.win32-3.7\MySQLdb
  creating build\lib.win32-3.7\MySQLdb\constants
  copying MySQLdb\constants\__init__.py -> build\lib.win32-3.7\MySQLdb\constants
  copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.7\MySQLdb\constants
  copying MySQLdb\constants\CR.py -> build\lib.win32-3.7\MySQLdb\constants
  copying MySQLdb\constants\ER.py -> build\lib.win32-3.7\MySQLdb\constants
  copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.7\MySQLdb\constants
  copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.7\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: 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: Complete output from command 'c:\users\libo3\appdata\local\programs\python\python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\libo3\\AppData\\Local\\Temp\\pip-install-dx_ukroi\\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\libo3\AppData\Local\Temp\pip-record-etl1tmtl\install-record.txt' --single-version-externally-managed --compile:
    ERROR: running install
    running build
    running build_py
    creating build
    creating build\lib.win32-3.7
    creating build\lib.win32-3.7\MySQLdb
    copying MySQLdb\__init__.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\_exceptions.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\compat.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\connections.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\converters.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\cursors.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\release.py -> build\lib.win32-3.7\MySQLdb
    copying MySQLdb\times.py -> build\lib.win32-3.7\MySQLdb
    creating build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\__init__.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\CLIENT.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\CR.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\ER.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-3.7\MySQLdb\constants
    copying MySQLdb\constants\FLAG.py -> build\lib.win32-3.7\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 "'c:\users\libo3\appdata\local\programs\python\python37-32\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\libo3\\AppData\\Local\\Temp\\pip-install-dx_ukroi\\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\libo3\AppData\Local\Temp\pip-record-etl1tmtl\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\libo3\AppData\Local\Temp\pip-install-dx_ukroi\mysqlclient\

So long list of errors, see my scalp tingling, the last in line to see other people have a similar error, you look at Mark

First, go to this site https://www.lfd.uci.edu/~gohlke/pythonlibs/, find what you want in the corresponding version, and then cmd in the Open download directory, pip install file you downloaded on OK

 

Guess you like

Origin www.cnblogs.com/afei123/p/11240182.html