简体   繁体   English

python错误ImportError:DLL加载失败:找不到指定的过程。 __load中的文件“ psycopg2 \\ _psycopg.pyc”,第10行

[英]python error ImportError: DLL load failed: The specified procedure could not be found. File “psycopg2\_psycopg.pyc”, line 10, in __load

I packaged a Windows application developped in python. 我打包了一个用python开发的Windows应用程序。 For the setup, no problem. 对于设置,没有问题。 When launching it up on my PC (let's say PC1), no problem. 在我的PC(比如PC1)上启动它时,没问题。 But when trying to launch it on another PC (let's say PC2), an error message shows up indicating to read the MYAPPLICATION.exe.log file. 但是,当尝试在另一台PC(例如PC2)上启动它时,将显示一条错误消息,指示已读取MYAPPLICATION.exe.log文件。 There s 1 error (only 1), here are the lines of the log : 有1个错误(只有1个),这是日志行:

File "MYAPPLICATION.pyc", line 9, in 在第9行的文件“ MYAPPLICATION.pyc”

File "psycopg2__init__.pyc", line 50, in 在第50行中输入“ psycopg2__init __。pyc”文件

File "psycopg2_psycopg.pyc", line 12, in 在第12行的文件“ psycopg2_psycopg.pyc”

File "psycopg2_psycopg.pyc", line 10, in __load __load中的文件“ psycopg2_psycopg.pyc”,第10行

ImportError: DLL load failed: The specified procedure could not be found. ImportError:DLL加载失败:找不到指定的过程。

Indications about my way of packaging : 关于我的包装方式的说明:

  • i used the command "setup.py py2exe --includes sip" (with the proper setup.py file) then InnoSetupCompiler. 我使用命令“ setup.py py2exe --includes sip”(带有正确的setup.py文件),然后使用InnoSetupCompiler。
  • I embedded both folders 'dist' and 'build'. 我同时嵌入了文件夹“ dist”和“ build”。 I even copied the 我什至复制了
    psycopg2 folder from site-packages to 'dist' (as well as mpl-data for matplotlib btw for which one i have no problem) before packaging 从站点软件包到“ dist”的psycopg2文件夹(以及我没有问题的matplotlib btw的mpl-data)
    with InnoSetup, so that i'm sure the module psycopg2 is well present on the PC2. 使用InnoSetup,以便我确定PC2上的模块psycopg2很好。 But when I try to run it on the PC2 which occurs the 但是当我尝试在PC2上运行它时
    error. 错误。 Indications about PC2 : it has the python modules already 关于PC2的迹象:它已经具有python模块
    installed on. 安装在。 (including the last version of psycog2) (包括psycog2的最新版本)

So why does the psycog2 module import fails here ? 那么,为什么在这里psycog2模块导入失败? Thanks. 谢谢。

"There are 2 DLLs that are required by pyscopg.pyd (secur32.dll & shfolder.dll) that are OS dependent." “ pyscopg.pyd(secur32.dll&shfolder.dll)需要2个与操作系统相关的DLL。” Removing them should do the trick. 删除它们应该可以解决问题。 I got this solution from here: http://psycopg.initd.narkive.com/FX7WIxE6/import-error-using-psycopg2-with-py2exe 我从这里得到了这个解决方案: http : //psycopg.initd.narkive.com/FX7WIxE6/import-error-using-psycopg2-with-py2exe

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 加载 psycopg2 模块时出错:导入 _psycopg 时 DLL 加载失败:找不到指定的模块 - Error loading psycopg2 module: DLL load failed while importing _psycopg: The specified module could not be found ImportError:DLL加载失败:找不到指定的过程。蟒蛇 - ImportError: DLL load failed: The specified procedure could not be found. Python Python 错误:ImportError: DLL 在 Python 3.7 上使用 psycopg2 加载失败 - Python error: ImportError: DLL Load failed with psycopg2 on Python 3.7 导入 pptx 时出错“导入错误:DLL 加载失败:找不到指定的过程。” - Error when Import pptx "ImportError: DLL load failed: The specified procedure could not be found." django.core.exceptions.ImproperlyConfigured:加载psycopg2模块时出错:DLL加载失败:找不到指定的模块 - django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: DLL load failed: The specified module could not be found 将Numpy导入Python:“ ImportError:DLL加载失败:找不到指定的过程。” - Importing Numpy to Python: “ImportError: DLL load failed: The specified procedure could not be found.” Boost.Python + opencv Error, Windows 10 x64, "ImportError: DLL load failed: The specified module could not be found." - Boost.Python + opencv Error, Windows 10 x64, "ImportError: DLL load failed: The specified module could not be found." 导入错误:导入 _psycopg 时 DLL 加载失败:找不到指定的模块 - ImportError: DLL load failed while importing _psycopg: The specified module could not be found 导入错误:DLL 加载失败:-尝试导入 psycopg2 库时 - ImportError: DLL load failed : - when trying to import psycopg2 library 导入错误:DLL 加载失败:找不到指定的模块。(Keras) - ImportError: DLL load failed: The specified module could not be found.(Keras)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM