-1

I am trying, in Windows 10, to install using pip MySQL-python as seen below. I am being told I need Microsoft Visual C++ 14 but I have installed Microsoft Visual Studio 11, 12, and 2017. 2017 should be providing me the required components if my research is accurate. I, also, installed Microsoft Build Tools. I am at a loss what is wrong. I am trying to migrate from my Ubuntu VM to native Windows with PyCharm. I have seen lots of other questions but none seem to have the answer I need.

enter image description here

    C:\Environment\Python27>pip install MySQL-python
Collecting MySQL-python
  Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip
Installing collected packages: MySQL-python
  Running setup.py install for MySQL-python ... error
    Complete output from command c:\users\efultz\appdata\local\programs\python\python37\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\efultz\\AppData\\Local\\Temp\\pip-build-3d7yo7lf\\MySQL-python\\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\efultz\AppData\Local\Temp\pip-wcici6ff-record\install-record.txt --single-version-externally-managed --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\converters.py -> build\lib.win-amd64-3.7\MySQLdb
    copying MySQLdb\connections.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\CR.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\ER.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
    copying MySQLdb\constants\CLIENT.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": https://visualstudio.microsoft.com/downloads/
sophros
  • 14,672
  • 11
  • 46
  • 75
efultz
  • 1,135
  • 2
  • 11
  • 26
  • Does this answer your question? [Pip error: Microsoft Visual C++ 14.0 is required](https://stackoverflow.com/questions/44951456/pip-error-microsoft-visual-c-14-0-is-required) – sophros Jan 13 '20 at 15:07

2 Answers2

0

I never figured out the problem but I believe it was related to having both Python2 and Python3 installed on my machine. I uninstalled Python3 and was able, with a little more effort, to get things working. Hopefully when we do our migration to Python3 I won't return to having this problem.

efultz
  • 1,135
  • 2
  • 11
  • 26
-1

If you want to install database i would go to Microsoft webpage (https://dev.mysql.com/doc/refman/8.0/en/windows-installation.html) and install it from there.

As far as i know, you can't install database via python's pip.

Rob
  • 415
  • 4
  • 12