有老猿知道需要链接hive数据库的Python代码怎么用pyinstaller打包吗,我打包了无法使用找不到jar包

Python代码里面要链接hive数据库,用pyinstaller模块打包以后自己电脑能用exe小程序,别的电脑无法使用会闪退,原因是找不到hive依赖jar包,这玩意有老猿知道怎么封装吗

找到\Lib\site-packages\PyInstaller\hooks,新建文件:
hook-(库的名称).py
在里面输入:


from PyInstaller.utils.hooks import collect_data_files
 
datas = collect_data_files('库名')