osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mysqlclient==1.4.6 none wheel doesn't work on ubuntu 18


I?m using pantsbuild to create a pex with SQLAlchemy==1.3.11 and mysqlclient==1.4.6. I?m going to run the pex on ubuntu 14 trusty and ubuntu 18 bionic.

To first build the wheel, I went to each ubuntu machine and ran this:

pip wheel ?no-cache-dir ?wheel-dir=./ mysqlclient==1.4.6

On the trusty machine, it created https://s3.amazonaws.com/aiq-public/ubuntu14/index.html. However on the bionic machine it created https://s3.amazonaws.com/aiq-public/ubuntu18/index.html.

I was very confused, but I just kept the ?none? wheel since that should be OS independent. I built the pex locally on each box, and it worked fine on trusty, however on bionic I saw this error:

  File "/home/ubuntu/.pex/install/SQLAlchemy-1.0.11-cp27-none-linux_x86_64.whl.2ad4de6e38cfa6e6073ca829b9a827ab4c9a46d8/SQLAlchemy-1.0.11-cp27-none-linux_x86_64.whl/sqlalchemy/engine/strategies.py", line 75, in create
    dbapi = dialect_cls.dbapi(**dbapi_args)
  File "/home/ubuntu/.pex/install/SQLAlchemy-1.0.11-cp27-none-linux_x86_64.whl.2ad4de6e38cfa6e6073ca829b9a827ab4c9a46d8/SQLAlchemy-1.0.11-cp27-none-linux_x86_64.whl/sqlalchemy/dialects/mysql/mysqldb.py", line 92, in dbapi

return __import__('MySQLdb')
  File "/home/ubuntu/.pex/install//mysqlclient-1.4.6-cp27-none-linux_x86_64.whl/MySQLdb/__init__.py", line 19, in <module>

import _mysql
ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory

That seemed very strange to me, so then I changed the bionic build to point to the os-specific wheel, and then it started working.

Is there some reason the ?none? wheel does not work on bionic? Somehow it seemed to be picking up the wrong libmysqlclient library? Note I have ?libmysqlclient.so? installed on both trusty (mysql 5.6) and bionic (mysql 5.7). They are different versions, but I didn?t think it mattered, if using a ?none? wheel then it should build on the box using whatever libraries the OS has, right?

Thanks.
?
Mitesh