我正在努力导入一个包含许多我需要使用的引擎的文件夹。我从main_file.py. 所以我想我可以使用 - from engines import qr_code_gen,但我需要导入一个命名的类, _QRCode_所以我尝试使用 - from .engines.qr_code_gen import _QRCode_,但它说“找不到模块引擎”。结构:Server/start.shServer/wsgi.pyServer/application/main_file.pyServer/application/engines/qr_code_gen.pyServer/application/engines/__init__.py...我用过sys.path,main_file.py我得到了-['C:\Users\Dzitc\Desktop\winteka2', 'C:\Users\Dzitc\AppData\Local\Programs\Python\Python37\Scripts\flask.exe', 'c:\users\dzitc\appdata\local \programs\python\python37\python37.zip', 'c:\users\dzitc\appdata\local\programs\python\python37\DLLs', 'c:\users\dzitc\appdata\local\programs\python\python37 \lib', 'c:\users\dzitc\appdata\local\programs\python\python37', 'C:\Users\Dzitc\AppData\Roaming\Python\Python37\site-packages', 'c:\users\ dzitc\appdata\local\programs\python\python37\lib\site-packages', 'c:\users\dzitc\appdata\local\programs\python\python37\lib\site-packages\win32', 'c:\ users\dzitc\appdata\local\programs\python\python37\lib\site-packages\win32\lib', 'c:\users\dzitc\appdata\local\programs\python\python37\lib\site-packages\Pythonwin ']
添加回答
举报
0/150
提交
取消