0

I am on a windows 8 64 bit os. Running 32 bit Python 2.7 (because I need packages that only run on this ver). I am trying to install mysql and MySQL from command promt. I am running cmd as an admin. I use:

cd C:/Python27/Scripts
pip install mysql-python

I get this error:

Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\us
ers\\troy\\appdata\\local\\temp\\pip-build-yn2u15\\mysql-python\\setup.py';exec(
compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'),
__file__, 'exec'))" install --record c:\users\troy\appdata\local\temp\pip-ohzg7c
-record\install-record.txt --single-version-externally-managed --compile" failed
 with error code 1 in c:\users\troy\appdata\local\temp\pip-build-yn2u15\mysql-py
thon

I also tried the same install with MySQL-python for the mysqldb and had a similar error message. Heres the total output before the error. please help me fix this.

C:\Python27\Scripts>pip install mysql-python
You are using pip version 7.0.1, however version 7.1.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting mysql-python
  Using cached MySQL-python-1.2.5.zip
Installing collected packages: mysql-python
  Running setup.py install for mysql-python
    Complete output from command C:\Python27\python.exe -c "import setuptools, t
okenize;__file__='c:\\users\\troy\\appdata\\local\\temp\\pip-build-yn2u15\\mysql
-python\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read()
.replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\troy\appda
ta\local\temp\pip-ohzg7c-record\install-record.txt --single-version-externally-m
anaged --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win32-2.7
    copying _mysql_exceptions.py -> build\lib.win32-2.7
    creating build\lib.win32-2.7\MySQLdb
    copying MySQLdb\__init__.py -> build\lib.win32-2.7\MySQLdb
    copying MySQLdb\converters.py -> build\lib.win32-2.7\MySQLdb
    copying MySQLdb\connections.py -> build\lib.win32-2.7\MySQLdb
    copying MySQLdb\cursors.py -> build\lib.win32-2.7\MySQLdb
    copying MySQLdb\release.py -> build\lib.win32-2.7\MySQLdb
    copying MySQLdb\times.py -> build\lib.win32-2.7\MySQLdb
    creating build\lib.win32-2.7\MySQLdb\constants
    copying MySQLdb\constants\__init__.py -> build\lib.win32-2.7\MySQLdb\constan
ts
    copying MySQLdb\constants\CR.py -> build\lib.win32-2.7\MySQLdb\constants
    copying MySQLdb\constants\FIELD_TYPE.py -> build\lib.win32-2.7\MySQLdb\const
ants
    copying MySQLdb\constants\ER.py -> build\lib.win32-2.7\MySQLdb\constants
    copying MySQLdb\constants\FLAG.py -> build\lib.win32-2.7\MySQLdb\constants
    copying MySQLdb\constants\REFRESH.py -> build\lib.win32-2.7\MySQLdb\constant
s
    copying MySQLdb\constants\CLIENT.py -> build\lib.win32-2.7\MySQLdb\constants

    running build_ext
    building '_mysql' extension
    error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).
Get it from http://aka.ms/vcpython27

    ----------------------------------------
lrrr
  • 29
  • 9
  • Maybe you should fix `error: Unable to find vcvarsall.bat` following [this](http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat) – luoluo Aug 07 '15 at 14:12
  • okay so I installed vcpython27 and visual c++ for windows as a whole but now i get the error `fatal error C1083: cannot open included file: 'config-win.h' no such file or directory` – lrrr Aug 07 '15 at 14:42
  • finally solved by following buffer's answer here, http://stackoverflow.com/questions/1972259/cannot-open-include-file-config-win-h-no-such-file-or-directory-while-inst – lrrr Aug 07 '15 at 15:01

0 Answers0