我编写了一个从不同数据库加载SQLAlchemy数据的应用程序。该工具已经使用了两年,现在我想嵌入一个DB2数据库。
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<html>
<head>
<script type="text/javascript" src="javascript.js"></script>
<link rel="stylesheet" href="style.css" type="text/css">
<title>Yunus Gök</title>
<body class="body">
</head>
<div class="header"><blockquote><q>Creativity is my way to say hi</q></blockquote></div>
<div class="text1"><blockquote><q>Welcome on my site</q></blockquote></div>
<script type="text/javascript">
splitWords();
</script>
<div class="background"></div>
<div class="borderimg"></div>
<div class="border"></div>
</body>
</html>
在PyCharm开发环境中,一切都运行得非常好。但是只要我使用PyInstaller创建一个可执行文件并运行它,就会出现以下错误消息:
self.engine = create_engine("db2+ibm_db://{}:{}@{}:{}/{}".format(user,password,server,port,dbname))
缺少的DLL是ibm_db.dll。可执行文件正在查看这个地方:
C:\用户\ JASSIN〜1.ROD \应用程序数据\本地\ Temp_MEI11〜1 \ ibm_db_dlls \ ibm_db.dll
但没有DLL。 PyInstaller spec文件:
Traceback (most recent call last):
File "coco.py", line 3, in <module>
File "C:\Python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
exec(bytecode, module.__dict__)
File "allyouneed.py", line 4, in <module>
File "C:\Python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
exec(bytecode, module.__dict__)
File "ais.py", line 27, in <module>
File "C:\Python27\Lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
exec(bytecode, module.__dict__)
File "Lib\site-packages\ibm_db.py", line 13, in <module>
File "Lib\site-packages\ibm_db.py", line 12, in __bootstrap__
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
Failed to execute script coco
也许有人知道这个问题或者可以帮助我。我真的很绝望。
谢谢和问候 Jassin