Open HyperDev724 opened 1 month ago
Do you get success if you run the Flask project on the command line?
Well, you are using two packages that may have the same functionality, but it seems that you are using mysqlclient.
cx_Freeze detects __import__
with a string but it may not be detecting an extension, so try using --includes=MySQLdb._mysql
to test. For instance:
python setup.py build_exe --includes=MySQLdb._mysql
@HyperDev724 Do you get success? Can I close this issue?
Prerequisite
Describe the bug When I was packaging the Flask project, the exe program encountered an error: ModuleNotFoundError: No module named 'MySQLdb'
Desktop (please complete the following information):
Flask==1.1.2 Flask-Bcrypt==0.7.1 Flask-Cors==3.0.8 Flask-Migrate==2.5.3 Flask-Script==2.0.6 Flask-SQLAlchemy==2.4.3 mysqlclient==2.0.0 PyMySQL==1.1.1 SQLAlchemy==1.3.18
Additional context Add any other context about the problem here.