Firebird嵌入式安装问题:无法确定库

时间:2017-12-30 15:37:46

标签: python dll firebird firebird-embedded client-library

我一直在编写一个打开Firebird数据库的小型Python应用程序。
为了达到这个目标,我使用了Firebird嵌入式2.5.7.27050,64位。

虽然每当我尝试使用Python连接到DB文件时,我都会收到以下错误:

Traceback (most recent call last):
  File "C:\Matteo\CMakeR\initApp.py", line 36, in <module>
    connection = connectToDB(path)
  File "C:\Matteo\CMakeR\initApp.py", line 10, in connectToDB
    charset='WIN1252'
  File "C:\Program Files\Python36\lib\site-packages\fdb\fbcore.py", line 682, in connect
    load_api(fb_library_name)
  File "C:\Program Files\Python36\lib\site-packages\fdb\fbcore.py", line 181, in load_api
    setattr(sys.modules[__name__],'api',fbclient_API(fb_library_name))
  File "C:\Program Files\Python36\lib\site-packages\fdb\ibase.py", line 1398, in __init__
    raise Exception("The location of Firebird Client Library could not be determined.")
Exception: The location of Firebird Client Library could not be determined.
>>> 

似乎FB客户端安装不正确。
但是我非常仔细地遵循了doc文件夹中的安装指南。
这是我的app文件夹:

04/01/2018  15:11    <DIR>          .
04/01/2018  15:11    <DIR>          ..
04/01/2018  14:57               133 aliases.conf
03/01/2018  14:20                 0 CMakeR.conf
02/01/2018  13:40             2.480 DB in chiaro.odb
04/01/2018  14:57    <DIR>          doc
30/12/2017  17:32               191 editXLS.py
30/12/2017  17:24            23.032 Export.xlsx
04/01/2018  14:57         5.664.256 fbclient.dll
04/01/2018  14:57         5.664.256 fbembed.dll
04/01/2018  14:46         5.199.849 Firebird-2.5.7.27050-0_x64_embed.zip
04/01/2018  14:57            27.661 firebird.conf
04/01/2018  14:57           149.440 firebird.msg
04/01/2018  14:57         5.664.256 gds32.dll
04/01/2018  14:57             8.192 ib_util.dll
04/01/2018  14:57         1.558.016 icudt30.dll
04/01/2018  14:57           575.488 icuin30.dll
04/01/2018  14:57           935.936 icuuc30.dll
04/01/2018  14:57            26.023 IDPLicense.txt
04/01/2018  15:09             1.583 initApp.py
04/01/2018  14:57    <DIR>          intl
04/01/2018  14:57            24.301 IPLicense.txt
04/01/2018  14:57               524 Microsoft.VC80.CRT.manifest
30/12/2017  17:24            28.625 Modulo CMR.xlsx
04/01/2018  14:57         1.097.728 msvcp80.dll
04/01/2018  14:57           822.784 msvcr80.dll
04/01/2018  14:57             2.333 Readme.txt
02/01/2018  13:40        50.790.400 testArchive.eft
04/01/2018  14:57    <DIR>          udf

2 个答案:

答案 0 :(得分:1)

谢谢大家帮我解决这个问题。
我感谢Arioch的建议,终于找到了解决方案。

使用Microsoft Process Monitor我能够检测到我的应用程序正在查找客户端库的文件夹。然后我注意到它们是PATH环境变量中指定的相同文件夹。
所以我将包含我的Python文件的文件夹添加到PATH变量中,所有内容终于解决了。

答案 1 :(得分:0)

我使用.NET中的嵌入式FB,但仍然将firebird.msg文件保存在与应用程序相同的文件夹中。而国际和国际udf文件夹不嵌套在FBE或某个文件夹中。我会说你把文件夹设置为FBE,它也在那里寻找二进制文件。 这看起来也像布局supposed一样。