0

I am trying to use pyinstaller to convert my .py to .exe format. this is the .py I am trying to convert

import pandas as pd      
import os                
import glob  
import re
import csv
#import time
rows = []  
d = {}
user_input = raw_input("Enter the path of your file: ")

#path = 'O:\People\Aravind_Sampathkumar\Logs'
for filename in glob.glob(os.path.join(user_input, '*.log')):

    r = re.compile(r'(\w+)\s+(-?\d+(?:\.\d+)?(?:e[+\-]?\d+)?)')        # into 2 groups

    d = dict(r.findall(open(filename, 'r').read()))
    d['filename'] = filename

    rows.append(d)

    df = pd.DataFrame(rows)
    df.to_csv('data.csv', columns=['COM','eh','ehc','ew','oeh','sp_icr','sp_il','filename'])

print "done!" 

On running pyinstaller --onefile c:\Users\Aravind_Sampathkumar\Desktop\PY\ParseTextToExcel.py my .exe file is created but when I try to execute it, it fails with this error

enter image description here

Why does it throw this error? The .py seems to work fine

Charles Duffy
  • 280,126
  • 43
  • 390
  • 441
Potato
  • 111
  • 10
  • can you checkout this question https://stackoverflow.com/questions/47318119/no-module-named-pandas-libs-tslibs-timedeltas-in-pyinstaller?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa? – Jay Apr 27 '18 at 08:57
  • In the future, please try to write a title that reflects the details of your specific question -- I've edited the title here towards that end. – Charles Duffy Apr 27 '18 at 14:18

0 Answers0