1

I've tried installing mysql by doing

pip install mysql

but I get this every time:

    Command "c:\users\j\appdata\local\programs\python
    \python37-32\python.exe -u -c "import setuptools, 
    tokenize;__file__='C:\\Users\\jmodiano\\AppData\\Local\\
    Temp\\pip-install-z5ktsicz\\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\j\AppData\Local\Temp\pip-
    record-99629v1_\install-record.txt --single-version-externally-
    managed --compile" failed with error code 1 in 
    C:\Users\j\AppData\Local\Temp\pip-install-z5ktsicz\mysqlclient\

I've tried installing in a different folder but it always gives the same error. Not sure what I'm doing wrong as it seems pretty straightforward.

1
  • AFAIK mysql client (binary/devel version in your case for Windows) should be installed before. Smth like this stackoverflow.com/a/25865271/2971192 but for Windows. Commented Oct 16, 2018 at 17:49

1 Answer 1

1

The problem is that there is no binary wheel for mysqlclient 1.3.13 at all in PyPI, hence you would require a compiler to install this. There is a wheel for 1.3.12, but not for Python 3.7 that you're using.

You can install a wheel for it from https://www.lfd.uci.edu/~gohlke/pythonlibs/ - one of mysqlclient‑1.3.13‑cp37‑cp37m‑win32.whl or mysqlclient‑1.3.13‑cp37‑cp37m‑win_amd64.whl - whichever bitness is correct.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.