danfengcao / binlog2sql

Parse MySQL binlog to SQL you want
GNU General Public License v3.0
3.33k stars 1.04k forks source link

包找不到 我的mac自带了一个2.7的系统路径python,我自己安装了一个3.9 执行的时候出现了这个问题 #86

Open sirius-il opened 3 years ago

sirius-il commented 3 years ago

✗ python binlog2sql.py -h 127.0.0.1 -u root --flashback -d sirius -t t --start-file='binlog.000015' --start-pos=1238826 > ~/Desktop/flashback.sql

Traceback (most recent call last): File "/Users/pisces/Documents/python application/binlog2sql/binlog2sql/binlog2sql.py", line 7, in from pymysqlreplication import BinLogStreamReader File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pymysqlreplication/init.py", line 23, in from .binlogstream import BinLogStreamReader File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pymysqlreplication/binlogstream.py", line 8, in from pymysql.util import int2byte ModuleNotFoundError: No module named 'pymysql.util'

michael-liumh commented 3 years ago

用Python 3.8吧,3.8没问题

raybon-lee commented 1 year ago

可以用 pip3 install pymysql