pyinstaller

Error after using PyInstaller for script with Matplotlib

两盒软妹~` 提交于 2021-02-05 10:50:49
问题 In my code I am using: import matplotlib.pyplot as plt import matplotlib.image as mpimg When I build the .py script, everything works fine. But after using the pyinstaller.exe to get the executable file, I get following error: Traceback (most recent call last): File "C:\Program Files\Python38\Scripts\excel_to_python.py", line 10, in <module> File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "

“has no attribute 'reduce_cython” error when using Pyinstaller exe

自古美人都是妖i 提交于 2021-02-05 08:00:35
问题 I used pyinstaller to convert my Python file to exe. While executing it I got the below error, AttributeError: type object 'neuralcoref.neuralcoref.array' has no attribute ' reduce_cython ' I'm using Python 3.6.7, Pyinstaller 4.0, NeuralCoref 4, Spacy 2.1.0, Cython 0.27.3. Any suggestion to solve this or better way to convert .py to exe? I've tried py2exe, Cxfreee but doesnt work. A minimal version of my code: import neuralcoref def ApplyCorefResolutionToPreProcessedMail(text, nlp): # load

Pyinstaller-compiled Uvicorn server does not start correctly

不打扰是莪最后的温柔 提交于 2021-02-05 07:12:10
问题 When I start the server.exe and it is trying to perform uvicorn.run() , the exception is being thrown: Traceback (most recent call last): File "logging\config.py", line 390, in resolve ModuleNotFoundError: No module named 'uvicorn.logging' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "logging\config.py", line 542, in configure File "logging\config.py", line 654, in configure_formatter File "logging\config.py", line 469, in

Pyinstaller-compiled Uvicorn server does not start correctly

僤鯓⒐⒋嵵緔 提交于 2021-02-05 07:11:27
问题 When I start the server.exe and it is trying to perform uvicorn.run() , the exception is being thrown: Traceback (most recent call last): File "logging\config.py", line 390, in resolve ModuleNotFoundError: No module named 'uvicorn.logging' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "logging\config.py", line 542, in configure File "logging\config.py", line 654, in configure_formatter File "logging\config.py", line 469, in

Pyinstaller: Import Error: DLL load failed: The specified module could not be found

霸气de小男生 提交于 2021-02-05 05:56:07
问题 I'm trying create an executable from my code that uses PyQt5. I'm using Python 3.5.3 -64 bits, developing in Windows 10, and used pip to install pyinstaller 3.2.1. I run pyinstaller as such: pyinstaller.exe --onefile --windowed main.py I get an Import Error: File "C:\Python35\Scripts\pyinstaller-script.py", line 11, in <module> load_entry_point('PyInstaller==3.2.1', 'console_scripts', 'pyinstaller')() File "C:\Python35\lib\site-packages\pkg_resources\__init__.py", line 565, in load_entry

pyinstaller failed to execute script pyi rth pkgres

≡放荡痞女 提交于 2021-02-04 21:28:16
问题 I have an exe file that I made with pyinstaller and when I try to run it it gives me this error: ModuleNotFoundError: No module named 'pkg_resources.py2_warn' [50728] Failed to execute script pyi_rth_pkgres the python script contains a scheduler using BlockingScheduler from apscheduler.schedulers.blocking that works when I execute it as a python script, but return this error as an exe file. 回答1: Saw this answer on stackoverflow (can't remember the url): Here's what you need to do: Step:1 pip

Pyinstaller 'failed to execute' script

我怕爱的太早我们不能终老 提交于 2021-02-04 16:37:04
问题 I am new to programming. I have made a python script. It runs without errors in pycharm. Using pyinstaller i tried to make an exe. When i run the exe in build or dist folder or even through command prompt, it gives me the error 'Failed to execute Script Main' I am attaching the warnings file link: https://drive.google.com/open?id=1cDQ2KGId0B8K9Qi1bWPIhL55hQO0dM-z Kindly help! 回答1: There is one pip script for each virtual environment. So when you install a python module it get installed into

pyinstaller打包多个py文件仍报错ModuleNotFoundError: No module named 'xxx'

╄→尐↘猪︶ㄣ 提交于 2021-02-02 13:04:32
[问题现象] 使用pyinstaller A.py -p b.py -p c.py打包多个文件 或者使用main.spec在Analysis配置好各个文件打包 打包成功后,运行main.exe仍然报错ModuleNotFoundError: No module named 'xxx' [问题原因] 在网上查了好久好久,卡了两天。。。。。众说纷纭,还有说pyinstaller不能识别“from xxx import xxx”的语句的。。。各种被误导。。。。 后来在https://blog.csdn.net/djshichaoren/article/details/79801531 看到 经过检查,发现 自己的目录下除了main.py,还有其他的一些py文件 。 于是猜想是pyinstaller在打包的时候, 如果main.py的目录下还有一些平级的py的话,pyinstaller就分不清楚谁是主文件入口,谁是导入文件。所以就会出现找不到模块的错误ModuleNotFoundError: No module named 'xxx' [解决方法] 修改一下目录结构,变成了 把其他py文件都放到目录下,保证项目下只有一个main.py 这样只需要输入pyinstaller main.py 就能打包多个文件,甚至是省去了-p的手动指定操作 原文出处:https://www.cnblogs

Auto-Py-To-Exe - win32api - ModuleNotFoundError

五迷三道 提交于 2021-01-29 16:10:27
问题 I have been attempting to compile a python project that uses these imports import os import numpy import sys import pytube import time from moviepy.editor import * I have installed all of them via pip and I have also been looking around for trouble shooting tips but none of them seem to work. I keep getting this error when executing the built executable via Auto-py-to-exe. Traceback (most recent call last): File "C:\Users\*****\AppData\Local\Programs\Python\Python38\Lib\site-packages

Create executable for Windows from python codebase that needs poppler

泄露秘密 提交于 2021-01-29 09:00:32
问题 I am using pdf2image in my code that in turn needs PATH to have the /bin folder of the Poppler binaries. I will need this in the PATH even after I create an executable that can run on Windows. Pyinstaller is great but does not support poppler yet. How do I go about packaging this? 回答1: Try pyinstaller --add-binary 'path\to\poppelr' script_name.py The --add-binary flag points pyinstaller to the binary location so it can include it. edit 2 Use the os module to add to SYSTEM PATH . I am using