Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Notice removed Comments only by Community Bot
Post Unlocked by Community Bot
Post Locked by samliew
Notice added Comments only by samliew
Mod Moved Comments To Chat
deleted 222 characters in body
Source Link
Carlo Zanocco
  • 2k
  • 4
  • 21
  • 33
  • Open you project folder and create inside it a setup.py file with inside:

    import sys
    from cx_Freeze import setup, Executable
    # GUI applications require a different base on Windows (the default is for a
    # console application).
    base = None
    if sys.platform == "win32":
     base = "Win32GUI"
    setup( name = "myProgram",
     version = "0.1",
     description = "My fancy description!""",
     executables = [Executable("myProgram.py", base=base)])
    

    Setting up this file require a little bit of study, there are multiple options to set. You can set the option to create a simple .exe or also the create a windows/mac/linux installer.

  • Once you have your file ready, with the options that you need, just open a shell/terminal/cmd in the directory where the setup.py file is located and execute: python setup.py build

  • Now in your project folder you will see a folder where inside you can find your .exe file.

  • Open you project folder and create inside it a setup.py file with inside:

    import sys
    from cx_Freeze import setup, Executable
    # GUI applications require a different base on Windows (the default is for a
    # console application).
    base = None
    if sys.platform == "win32":
     base = "Win32GUI"
    setup( name = "myProgram",
     version = "0.1",
     description = "My fancy description!",
     executables = [Executable("myProgram.py", base=base)])
    

    Setting up this file require a little bit of study, there are multiple options to set. You can set the option to create a simple .exe or also the create a windows/mac/linux installer.

  • Once you have your file ready, with the options that you need, just open a shell/terminal/cmd in the directory where the setup.py file is located and execute: python setup.py build

  • Now in your project folder you will see a folder where inside you can find your .exe file.

  • Open you project folder and create inside it a setup.py file with inside:

    import sys
    from cx_Freeze import setup, Executable
    setup( name = "myProgram",
     version = "0.1",
     description = "",
     executables = [Executable("myProgram.py")])
    

    Setting up this file require a little bit of study, there are multiple options to set. You can set the option to create a simple .exe or also the create a windows/mac/linux installer.

  • Once you have your file ready, with the options that you need, just open a shell/terminal/cmd in the directory where the setup.py file is located and execute: python setup.py build

  • Now in your project folder you will see a folder where inside you can find your .exe file.

added 271 characters in body
Source Link
Carlo Zanocco
  • 2k
  • 4
  • 21
  • 33
  • Open you project folder and create inside it a setup.py file with inside:

    from sys import executablesys
    from cx_Freeze import setup, Executable
    # GUI applications require a different base on Windows (the default is for a
    # console application).
    base = None
    if sys.platform == "win32":
     base = "Win32GUI"
    setup(name='programName' name = "myProgram", version='0 version = "0.1'1", description='my description = "My fancy description'description!",
     executables = [Executable("myProgram.py", base=base)])
    

    Setting up this file require a little bit of study, there are multiple options to set. You can set the option to create a simple .exe or also the create a windows/mac/linux installer.

  • Once you have your file ready, with the options that you need, just open a shell/terminal/cmd in the directory where the setup.py file is located and execute: python setup.py build

  • Now in your project folder you will see a folder where inside you can find your .exe file.

  • Open you project folder and create inside it a setup.py file with inside:

    from sys import executable
    from cx_Freeze import setup, Executable
    setup(name='programName', version='0.1', description='my fancy description')
    

    Setting up this file require a little bit of study, there are multiple options to set. You can set the option to create a simple .exe or also the create a windows/mac/linux installer.

  • Once you have your file ready, with the options that you need, just open a shell/terminal/cmd in the directory where the setup.py file is located and execute: python setup.py build

  • Now in your project folder you will see a folder where inside you can find your .exe file.

  • Open you project folder and create inside it a setup.py file with inside:

    import sys
    from cx_Freeze import setup, Executable
    # GUI applications require a different base on Windows (the default is for a
    # console application).
    base = None
    if sys.platform == "win32":
     base = "Win32GUI"
    setup( name = "myProgram",  version = "0.1", description = "My fancy description!",
     executables = [Executable("myProgram.py", base=base)])
    

    Setting up this file require a little bit of study, there are multiple options to set. You can set the option to create a simple .exe or also the create a windows/mac/linux installer.

  • Once you have your file ready, with the options that you need, just open a shell/terminal/cmd in the directory where the setup.py file is located and execute: python setup.py build

  • Now in your project folder you will see a folder where inside you can find your .exe file.

deleted 3 characters in body
Source Link
Carlo Zanocco
  • 2k
  • 4
  • 21
  • 33

I faced this problem some times ago, after a lot of googling I found the best solution for me.

Alternatives

  • Py2Exe: Which is old, the last release on PyPi is on 21 October 2014.
  • pyInstaller: Is a nice tool, but with some problem that we will see later.
  • auto-py-to-exe: Use pyInstaller to build the .exe, so suffer the same problem, but has a nice GUI and is intuitive to use.
  • cx_Freeze cx_Freeze: I think the best solution, because it was the only one that works in my case, it is also recommended from python

Investigation

During this time I looked on google and StackOverflow for the best solution, each time that I found something it was out-dated or not well explained/documented, so I studied the official docs.

py2exe

As first try I installed py2exe it seems the best option, also recommended from python, so, give it a try. All goes fine during the installation process, so I decide to follow the tutorial and get my .exe.

During the step 3 of the tutorial, running setup I received an error, looking on google I found this.

I gave up with py2exe.

auto-py-to-exe && pyInstaller

I have installed auto-py-to-exe and all went good, the program open without problems so I create my .exe file, that works!

The only problem was that, the program works only on my laptop, on all the other machine where I try to execute the antivirus delete it.

Looking on google I found the github repository where I found one issue like the mine, reading it I understand that the problem is pyInstaller.

Looking on the pyInstaller repository I found one issue where one contributors tells to contact the antivirus vendo, so I gave up again.

cx_Freeze

Looking the docs it seems to be overcomplicated realize a simple .exe, so I have studied the documentation and found what I need. If you need support for Python 2.x, cx_Freeze version 5.1.x should be used instead, to do it just run pip install cx-Freeze==5.1.1

  • Open you project folder and create inside it a setup.py file with inside:

    from sys import executable
    from cx_Freeze import setup, Executable
    setup(name='programName', version='0.1', description='my fancy description')
    

    Setting up this file require a little bit of study, there are multiple options to set. You can set the option to create a simple .exe or also the create a windows/mac/linux installer.

  • Once you have your file ready, with the options that you need, just open a shell/terminal/cmd in the directory where the setup.py file is located and execute: python setup.py build

  • Now in your project folder you will see a folder where inside you can find your .exe file.

I faced this problem some times ago, after a lot of googling I found the best solution for me.

Alternatives

  • Py2Exe: Which is old, the last release on PyPi is on 21 October 2014.
  • pyInstaller: Is a nice tool, but with some problem that we will see later.
  • auto-py-to-exe: Use pyInstaller to build the .exe, so suffer the same problem, but has a nice GUI and is intuitive to use.
  • cx_Freeze: I think the best solution, because it was the only one that works in my case, it is also recommended from python

Investigation

During this time I looked on google and StackOverflow for the best solution, each time that I found something it was out-dated or not well explained/documented, so I studied the official docs.

py2exe

As first try I installed py2exe it seems the best option, also recommended from python, so, give it a try. All goes fine during the installation process, so I decide to follow the tutorial and get my .exe.

During the step 3 of the tutorial, running setup I received an error, looking on google I found this.

I gave up with py2exe.

auto-py-to-exe && pyInstaller

I have installed auto-py-to-exe and all went good, the program open without problems so I create my .exe file, that works!

The only problem was that, the program works only on my laptop, on all the other machine where I try to execute the antivirus delete it.

Looking on google I found the github repository where I found one issue like the mine, reading it I understand that the problem is pyInstaller.

Looking on the pyInstaller repository I found one issue where one contributors tells to contact the antivirus vendo, so I gave up again.

cx_Freeze

Looking the docs it seems to be overcomplicated realize a simple .exe, so I have studied the documentation and found what I need.

  • Open you project folder and create inside it a setup.py file with inside:

    from sys import executable
    from cx_Freeze import setup, Executable
    setup(name='programName', version='0.1', description='my fancy description')
    

    Setting up this file require a little bit of study, there are multiple options to set. You can set the option to create a simple .exe or also the create a windows/mac/linux installer.

  • Once you have your file ready, with the options that you need, just open a shell/terminal/cmd in the directory where the setup.py file is located and execute: python setup.py build

  • Now in your project folder you will see a folder where inside you can find your .exe file.

I faced this problem some times ago, after a lot of googling I found the best solution for me.

Alternatives

  • Py2Exe: Which is old, the last release on PyPi is on 21 October 2014.
  • pyInstaller: Is a nice tool, but with some problem that we will see later.
  • auto-py-to-exe: Use pyInstaller to build the .exe, so suffer the same problem, but has a nice GUI and is intuitive to use.
  • cx_Freeze: I think the best solution, because it was the only one that works in my case, it is also recommended from python

Investigation

During this time I looked on google and StackOverflow for the best solution, each time that I found something it was out-dated or not well explained/documented, so I studied the official docs.

py2exe

As first try I installed py2exe it seems the best option, also recommended from python, so, give it a try. All goes fine during the installation process, so I decide to follow the tutorial and get my .exe.

During the step 3 of the tutorial, running setup I received an error, looking on google I found this.

I gave up with py2exe.

auto-py-to-exe && pyInstaller

I have installed auto-py-to-exe and all went good, the program open without problems so I create my .exe file, that works!

The only problem was that, the program works only on my laptop, on all the other machine where I try to execute the antivirus delete it.

Looking on google I found the github repository where I found one issue like the mine, reading it I understand that the problem is pyInstaller.

Looking on the pyInstaller repository I found one issue where one contributors tells to contact the antivirus vendo, so I gave up again.

cx_Freeze

Looking the docs it seems to be overcomplicated realize a simple .exe, so I have studied the documentation and found what I need. If you need support for Python 2.x, cx_Freeze version 5.1.x should be used instead, to do it just run pip install cx-Freeze==5.1.1

  • Open you project folder and create inside it a setup.py file with inside:

    from sys import executable
    from cx_Freeze import setup, Executable
    setup(name='programName', version='0.1', description='my fancy description')
    

    Setting up this file require a little bit of study, there are multiple options to set. You can set the option to create a simple .exe or also the create a windows/mac/linux installer.

  • Once you have your file ready, with the options that you need, just open a shell/terminal/cmd in the directory where the setup.py file is located and execute: python setup.py build

  • Now in your project folder you will see a folder where inside you can find your .exe file.

Source Link
Carlo Zanocco
  • 2k
  • 4
  • 21
  • 33
Loading
lang-py

AltStyle によって変換されたページ (->オリジナル) /