2

I have this code which i need to create it as a python exe file, where in user has to click the workflow done.

My Sample Project

import os import pandas as pd import sys import csv path = os.getcwd() v1 = pd.read_csv(r"path\V1.tsv", delimiter = '\t') v1.to_csv(r"path\v2.csv", index=False) 

I used Pyinstaller to create a .exe file but it didnt help me achieve what I want. Can some one suggest me?

4
  • 1
    could you please tell what error occured? Commented Oct 30, 2020 at 12:57
  • 2
    Are you aware that you don't use your variable path in r"path\V1.tsv"? Does your program run if you start it as a script? Commented Oct 30, 2020 at 13:05
  • 1
    Have your tried using the --onefile flag to specify that you only want 1 exe file to be created for that script. Commented Mar 29, 2022 at 20:07
  • "It didn't help me achieve what I want." What is it that you want? How can we possibly help you if we don't know what didn't work? Commented Jan 4, 2024 at 3:07

2 Answers 2

2

Depending on what disappointed you about PyInstaller, (speed? size? too many files in directory?), you may either want to try:

  • PyInstaller's --onefile flag, which will compile everything into one .exe file but will take forever to run
  • cx_Freeze. This can generate .exe files like PyInstaller, though performance won't be much better. What I find most useful is to compile the files into an installer by calling py setup.py bdist_msi (Windows) or py setup.py bdist_dmg (Linux). People can use the installer to add the .exe to their machines. Installer-created .exe files will run very quickly.
Sign up to request clarification or add additional context in comments.

Comments

1

Have your tried using the --onefile flag to specify that you only want 1 exe file to be created for that script.

For example use the cmd: pyinstaller --onefile file_name.py

If this does not help can you specify the issue that is occurring.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.