stackUnderflow
stackUnderflow

Reputation: 57

Error on running exe build using Pyinstaller

Following is the list of modules I am using:

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

Exception

Traceback (most recent call last):
  File "c:\python\lib\site-packages\matplotlib\backends\backend_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:\python\lib\site-packages\matplotlib\backends\backend_webagg.py", line 31, in <module>
    raise RuntimeError("The WebAgg backend requires Tornado.")

Error on running the generated exe:

File "c:\python\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\scipy\sparse\linalg\isolve\iterative.py", line 7, in <module>
  File "c:\python\lib\site-packages\PyInstaller\loader\pyimod03_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

I have tried the suggested solutions on git links but nothing seems to work. The script itself runs fine. Iam on Windows 10, Python 3.6

Upvotes: 1

Views: 1354

Answers (1)

stackUnderflow
stackUnderflow

Reputation: 57

I was able to finally resolve the issue by following:

  1. Installing and install tornado and importing tornado as pointed by Diego Contreras in comments
  2. Following the steps mentioned in the post [How do you resolve 'hidden imports not found!' warnings in pyinstaller for scipy?

Make sure your Microsoft build tools are installed and the dll location is present in PATH(both x86 and x64). Restart the machine after editing PATH variables.

Upvotes: 1

Related Questions