When use pyinstaller package asyncmy, will get like this:
Traceback (most recent call last):
File "main.py", line 11, in <module>
from asyncmy import connect
File "PyInstaller\loader\pyimod02_importers.py", line 419, in exec_module
File "asyncmy\__init__.py", line 1, in <module>
File "asyncmy\\connection.pyx", line 14, in init asyncmy.connection
ImportError: cannot import name auth
[432] Failed to execute script 'main' due to unhandled exception!
use pyinstaller's hiddenimports can fix this problem.
Maybe you can add import in init.py,like this:
from asyncmy.connection import Connection, connect # noqa:F401
from asyncmy.pool import Pool, create_pool # noqa:F401
from asyncmy import auth
from asyncmy import constants
from asyncmy import structs,converters,charset,optionfile,protocol
from asyncmy import contexts
from asyncmy import version
When use pyinstaller package asyncmy, will get like this:
use pyinstaller's hiddenimports can fix this problem.
Maybe you can add import in init.py,like this: