使用Pyinstaller运行EXE构建时的错误



以下是我正在使用的模块列表:

import sys
import cv2
import numpy as np
import pytesseract
from PIL import Image
from sklearn.cluster import MeanShift, estimate_bandwidth
from sklearn.datasets.samples_generator import make_blobs
import re
import jellyfish

例外

Traceback (most recent call last):
  File "c:pythonlibsite-packagesmatplotlibbackendsbackend_webagg.py", line 29, in <module>
    import tornado
ModuleNotFoundError: No module named 'tornado'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<string>", line 12, in <module>
  File "c:pythonlibsite-packagesmatplotlibbackendsbackend_webagg.py", line 31, in <module>
    raise RuntimeError("The WebAgg backend requires Tornado.")

运行生成的EXE时错误:

File "c:pythonlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packagesscipysparselinalgisolveiterative.py", line 7, in <module>
  File "c:pythonlibsite-packagesPyInstallerloaderpyimod03_importers.py", line 714, in load_module
    module = loader.load_module(fullname)
ImportError: DLL load failed: The specified module could not be found.
[22724] Failed to execute script main

我尝试了有关GIT链接的建议解决方案,但似乎没有任何作用。脚本本身运行良好。IAM在Windows 10上,Python 3.6

我最终能够通过以下内容解决问题:

  1. 安装并安装龙卷风并导入龙卷风 迭戈·孔特雷拉斯(Diego Contreras(在评论
  2. 遵循帖子中提到的步骤[如何解决"找不到隐藏的导入!"pyinstaller的警告?

确保安装了Microsoft构建工具,并且DLL位置在路径(X86和X64(中都存在。编辑路径变量后重新启动机器。

最新更新