Python Kfir
Python Kfir

Reputation: 3

Pyinstaller Error when running the exe file

I wrote python script which include tkinter, sqllite3, matplotlib and other libraries. When I bundle the script to exe file by using pyinstaller, it's finished successfully but when I run the exe file it's giving me this error: the error I get

Need to mention that I don't use any library name babel. I also add my code to the application below:


# Core PackAages
import tkinter as tk
from tkinter import *
from tkinter import ttk
from tkinter.scrolledtext import *
import tkinter.filedialog
from tkcalendar import Calendar, DateEntry
from tkinter import messagebox
from tkintertable import TableCanvas, TableModel
from tkinter import ttk
import matplotlib.pyplot as plt
from fpdf import FPDF

#background


# Database
import sqlite3
import csv


Upvotes: 0

Views: 2261

Answers (2)

Add following code to your python script, while bundling with pyinstaller

import babel.numbers

Upvotes: 1

Ruli
Ruli

Reputation: 2791

You seem to have similar problem as here. The solution is simple, add hidden import:

pyinstaller.exe --hidden-import babel.numbers script.py

Upvotes: 2

Related Questions