【问题标题】:Problem with PyInstaller executable including scikit-imagePyInstaller 可执行文件(包括 scikit-image)的问题
【发布时间】:2021-07-01 12:40:35
【问题描述】:

我使用 PyInstaller 4.3 和 scikit-image 0.18.1 创建了一个应用程序。我将它安装在一个干净的 Windows 10 虚拟机上进行测试。但是,当运行可执行文件(启用控制台输出)时,它会显示以下错误:

ImportError: DLL load failed while importing _rolling_ball_cy: The specified module could not be found.
[4920] Failed to execute script main

我尝试将skimage.restoration._rolling_ball_cy 添加到setup.py 中的隐藏导入中,但这并没有解决问题。

【问题讨论】:

  • 你使用了什么pyinstaller执行命令?
  • 也试过 scikit-image==0.18.2
  • @patrickgerard pyinstaller -F -y main.spec。生成的可执行文件给出了错误。
  • 试试这个pyinstaller --noconfirm --onefile --console "C:/path/to/file"
  • 我找到了解决方案。谢谢@patrickgerard。

标签: python windows pyinstaller python-3.8 scikit-image


【解决方案1】:

我使用ProcessMonitor 来查看在加载_rolling_ball_cy 时发生了什么。可执行文件正在寻找VCOMP140.DLL。将此库从构建系统复制到测试系统上主要可执行文件的文件夹后,它就可以工作了。

VCOMP140.DLL 是 Microsoft 的 vcredist_x64.exe 可再发行组件的一部分(请参阅 more information)。

【讨论】:

    猜你喜欢
    • 2020-07-09
    • 1970-01-01
    • 1970-01-01
    • 2021-06-22
    • 2016-08-01
    • 1970-01-01
    • 2021-07-12
    • 2014-12-22
    • 1970-01-01
    相关资源
    最近更新 更多