After finishing of one of my Flask projects, I uploaded it on github just like everybody else.
(在完成我的一个Flask项目之后,我像其他人一样将其上传到了github。)
after a 2-3 months period I downloaded the entire githube repository on another machine to run it.(在2-3个月的时间后,我将整个githube存储库下载到另一台计算机上以运行它。)
However, the app is not working because the packages are not found giving the following message(但是,该应用程序无法正常运行,因为找不到提供以下消息的软件包)
ModuleNotFoundError: No module named 'Flask'
(ModuleNotFoundError:没有名为“ Flask”的模块)
So I ended up downloading all packages starting from Flask, SQLalchemy,..etc!
(因此,我最终下载了从Flask,SQLalchemy等所有软件包。)
but I got stuck withMySQLdb
: (但是我被MySQLdb
卡住了:)
(MYAPPENV) C:Usershpmyapp>python run.py
Traceback (most recent call last):
File "run.py", line 1, in <module>
from app import app
File "C:Usershpmyappapp\__init__.py", line 4, in <module>
from instance.config import engine
File "C:Usershpmyappinstanceconfig.py", line 52, in <module>
engine = create_engine("mysql://root:root@localhost/MYAPPDB")
File "C:UsershpAppDataLocalProgramsPythonPython37-32libsite-packagessqlalchemyengine\__init__.py", line 425, in create_engine
return strategy.create(*args, **kwargs)
File "C:UsershpAppDataLocalProgramsPythonPython37-32libsite-packagessqlalchemyenginestrategies.py", line 81, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "C:UsershpAppDataLocalProgramsPythonPython37-32libsite-packagessqlalchemydialectsmysqlmysqldb.py", line 102, in dbapi
return __import__('MySQLdb')
ModuleNotFoundError: No module named 'MySQLdb'
Could anybody please help with this issue?
(有人可以帮忙解决这个问题吗?)
I am using python37 on windows machine.(我在Windows机器上使用python37。)
I even tried downloading packages such as mysqlclient,..etc but it didn't work out.(我什至尝试下载软件包,例如mysqlclient,.. etc,但没有成功。)
ask by Belle translate from so