WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: MySQL-Python connector: version libmysqlclient didn't match  (Read 1658 times)

Offline teh-botol

  • WikiUser
  • *
  • Posts: 23
MySQL-Python connector: version libmysqlclient didn't match
« on: December 24, 2016, 10:23:47 PM »
Hi Guys,

I just install PiCore 8.x with mariadb.
And I build MySQLdb1 (MySQL-Python connector) successfully.

But at runtime, I got this error:
Code: [Select]
tc@box:~/test$ ./start
Traceback (most recent call last):
  File "start.py", line 15, in <module>
    DB_ENGINE = create_engine(connstr)
  File "build/bdist.linux-armv7l/egg/sqlalchemy/engine/__init__.py", line 387, in create_engine

  File "build/bdist.linux-armv7l/egg/sqlalchemy/engine/strategies.py", line 80, in create
  File "build/bdist.linux-armv7l/egg/sqlalchemy/dialects/mysql/mysqldb.py", line 110, in dbapi
  File "build/bdist.linux-armv7l/egg/MySQLdb/__init__.py", line 19, in <module>

  File "build/bdist.linux-armv7l/egg/_mysql.py", line 7, in <module>
  File "build/bdist.linux-armv7l/egg/_mysql.py", line 6, in __bootstrap__
ImportError: /home/tc/.python-eggs/MySQL_python-1.2.4-py2.7-linux-armv7l.egg-tmp/_mysql.so: symbol mysql_shutdown, version libmysqlclient_16 not defined in file libmysqlclient.so.18 with link time reference


Ref:
MySQLdb1 source: https://github.com/farcepest/MySQLdb1


BR,
adit


Offline teh-botol

  • WikiUser
  • *
  • Posts: 23
Re: MySQL-Python connector: version libmysqlclient didn't match
« Reply #1 on: December 24, 2016, 11:45:35 PM »
FYI, I'm doing fine build and using MySQLdb1 inside TinyCore 7.x using virtual box.

BR,
adit

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7172
    • My Community Forum
Re: MySQL-Python connector: version libmysqlclient didn't match
« Reply #2 on: December 25, 2016, 03:20:52 AM »
Looks it is incompatible with current MariaDB. Use mysql-connector-python.tcz from the repo.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline teh-botol

  • WikiUser
  • *
  • Posts: 23
Re: MySQL-Python connector: version libmysqlclient didn't match
« Reply #3 on: December 25, 2016, 04:06:04 AM »
I got: ImportError: No module named mysql
am I missing something?

Code: [Select]
tc@box:~/test$ ./start
Traceback (most recent call last):
  File "/home/tc/pos-cashier/globals.py", line 36, in <module>
    DB_ENGINE = create_engine(connstr)
  File "build/bdist.linux-armv7l/egg/sqlalchemy/engine/__init__.py", line 387, in create_engine

  File "build/bdist.linux-armv7l/egg/sqlalchemy/engine/strategies.py", line 80, in create
  File "build/bdist.linux-armv7l/egg/sqlalchemy/dialects/mysql/mysqlconnector.py", line 107, in dbapi
ImportError: No module named mysql

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7172
    • My Community Forum
Re: MySQL-Python connector: version libmysqlclient didn't match
« Reply #4 on: December 25, 2016, 05:00:35 AM »
Thanks for noting, fixed.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline teh-botol

  • WikiUser
  • *
  • Posts: 23
Re: MySQL-Python connector: version libmysqlclient didn't match
« Reply #5 on: December 25, 2016, 05:38:11 AM »
Thx bmarkus, working great.

Information for someone needed (and personal note to try alternative):
I also tried download those connector from http://dev.mysql.com/downloads/connector/python/, "Platform Independent" one. For my surprise it's pure python. Hence, i tried it:
Extension needed setuptools.tcz
Code: [Select]
$ python setup.py build
$ python setup.py install --user
and it's working great.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7172
    • My Community Forum
Re: MySQL-Python connector: version libmysqlclient didn't match
« Reply #6 on: December 26, 2016, 12:07:24 AM »
pymysql.tcz added to repo. It is another MySQL connector written in pure Python.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."