I would like if anyone encountered the following error while running Pyinstaller.
Loading module hook "hook-notebook.py"...
Unable to find "c:\program files...\symbols\greek-mathfonts-sans-serif-bold.js" when adding binary and data files.
I followed the directory to the 'missing file' but it is right there with the same file name "greek-mathfonts-sans-serif-bold" and is a JS file.
Does anyone know the solution to this?
I've written a simple python script that uses openpyxl to read IP's out of an excel file and does a whois lookup on it and writes the results to a new excel file. Everything works great in Spyder but when I package it as an exe using pyinstaller I get an error when I run the exe.
The traceback says "'Worksheet' object has no attribute 'values'" like it's not reading the values from the original excel file. I've tried using the full path of the file but still get the same error. The excel file is in the same directory as the exe. Do I need to package the exe in a different way? Specifically tell it to package the openpyxl library?
I've done a lot of googling and can't find much info. Any help is appreciated! Thank you
I have developed a simple software in python with GUI. I'm actually working on Natural Language Processing and I've just put the whole NLP process in a GUI.
I tried to convert the whole project to a exe file in python using Pyinstaller. I successfully converted it to an exe file but when I run it , it shows an error message something like this
This is the image of my error
I have already solved it but by using another way of converting py to exe which is the cx_Freeze.
I had the same issue earlier today and finally got it to work using the following software versions:
Python 3.6.8, nltk 3.5 and a dev version of pyinstaller:
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
Additionally, I used scikit-learn version 0.21.1.
Few days back, I had the same problem while compressing to EXE. This Problem generally occurs when PyInstaller failes to find Libraries and Modules to import to the directory. But I overcame this problem and the wise solution yet tedious method to do is mentioned below,
Convert Python Scripts to EXE with console = True in the .spec file or to be simple, do not add --noconsole argument while converting using System Argmuents method.(execute GUI with CMD)
After successfully building the file, go to respective directory (dist folder) and open command prompt
Run the Exe file using Command Prompt.
Find the error message and rectify it correspondingly. For example, consider the following Error Message, vcomp140.dll is missing from \\sklearn\\libs directory.
At the end of this Error Message, you'll find Failed to load dynlib/dll , Therefore, find the file or program which is missing. Say, Here we've .libs\\vcomp140.dll
Find vcomp140.dll using window search bar in your C Drive.
Copy the specific file and paste in the directory(under "dist" folder) where the file is missing. Here, the directory is dist\\PyScriptToEXE\\sklearn\\.libs
MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
exec(bytecode, module.__dict__)
Traceback (most recent call last):
...
...
...
py3.7.egg\PyInstaller\loader\pyiboot01_bootstrap.py", line 169, in __init__
__main__.PyInstallerImportError: Failed to load dynlib/dll 'C:\\Users\\MOHAMM~1\\AppData\\Local\\Temp\\_MEI38242\\sklearn\\.libs\\vcomp140.dll'. Most probably this dynlib/dll was not found when the application was frozen.
[13968] Failed to execute script try
Follow the steps again using CMD to eliminate each error.
I've tried to convert a python script to exe using auto-py-to-exe. I had no errors whatsoever when building the exe, but when I try to open the app I get an error:
[63820] Error loading Python lib '/Users/calinap/output/random_movie_generator.app/Contents/MacOS/Python': dlopen: dlopen(/Users/calinap/output/random_movie_generator.app/Contents/MacOS/Python, 10): no suitable image found. Did find:
/Users/calinap/output/random_movie_generator.app/Contents/MacOS/Python: code signature invalid for '/Users/calinap/output/random_movie_generator.app/Contents/MacOS/Python'
The script has some additional files: an xlsx and another py file that are in the correct directory.
If you know other ways to convert it or have a solution to my problem please help!!
I have python exe file which has been made using cx_Freeze. Basically The script uses the text file "XYZ.txt" to generate a word cloud. When I run the python exe file everything is fine and the code runs well, but I am planning to run it from an external program (a game which generates the text file) and when I'm trying to run it from that game, python exe runs but gives me the FileNotFoundError: [Error 2] No such file or directory: 'XYZ.txt'. But the 'XYZ.txt' actually is in the same folder and at the same time. Besides, I tried to run the text file from that game and it opened but the python exe cannot find it.
I have also tried to run my game as administrator and then running the python exe and then I got: "dll load failed the specified module could not be found" instead of the previous error.
I would be thankful if anyone could help me with that.
please give the absolute path for 'XYZ.txt' in your python code. I guess that might solve the problem.