0

I have python 3.7.9 and I am trying to install mysqlclient package

if I give "pip install mysqlclient" it gives below error

ERROR: Command errored out with exit status 1: /usr/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-72vmg7v7/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-72vmg7v7/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 /tmp/pip-record-j125wcaz/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/sachin/.local/include/python3.7m/mysqlclient Check the logs for full command output.

When I try to install off line and download cp37 version for my python 3.7.9 and run below command pip install mysqlclient-2.0.1-cp37-cp37m-win_amd64.whl

It gives error ERROR: mysqlclient-2.0.1-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.

My python is 64 bit and I am using Ubuntu 20.04.1 LTS

import struct print(struct.calcsize("P") * 8)

Pls help! Thanks in advance.

jordanm
  • 33,009
  • 7
  • 61
  • 76
  • There is an error earlier in the `pip install mysqlclient` output that's missing from your post. Most likely missing libmysql-dev OS package. – jordanm Sep 03 '20 at 17:23
  • 1
    mysqlclient-2.0.1-cp37-cp37m-**win_amd64**.whl is for 64-bit Windows, so won't work on Ubuntu. Try `sudo apt install apt libmysqlclient-dev` before `pip install mysqlclient`. – Alasdair Sep 03 '20 at 17:28

0 Answers0