sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:mariadb.mariadbconnector

376 Views Asked by At

I have a simple python script packaged using pyinstaller and when I tried to run I am getting this error

sqlalchemy.exc.NoSuchModuleError: Can't load plugin: 
sqlalchemy.dialects:mariadb.mariadbconnector

although I already have mariadbconnector installed. Can anyone please help me point to the right direction?

1

There are 1 best solutions below

0
Alexey Pirogov On

Try to add to pynstaller command line additional parametrs:

--collect-all sqlalchemy --collect-all mariadb

So, for instance:

C:\python3.11\Scripts\pyinstaller --onefile myapp.py --collect-all sqlalchemy --collect-all mariadb