pyinstaller | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1


I have a python program that reads data from a csv file. I want to convert the script into a .exe application but the inclusion of the csv file is not making it work. is there a way to tell pyinstaller to consider the csv file too??

29th Sep 2018, 4:21 PM
Toni Sedjoah
Toni Sedjoah - avatar
2 Answers
+ 2
Move Your CSV File To The Exe Folder And, In Your Script Use: import os csv=os.path.join(os.path.dirname(os.path.realpath(__file__)), 'CSV.csv') Now, Load Your CSV File In Pandas...
9th Oct 2021, 5:14 AM
Sancho Godinho
Sancho Godinho - avatar
- 1
I have not used pyinstaller but importing pandas in python script and using read_csv function should work. You can use a data frame to store the csv content.
29th Sep 2018, 6:33 PM
Van Hohenheim
Van Hohenheim - avatar