D
D
dsgnfox2017-09-24 14:07:06
linux
dsgnfox, 2017-09-24 14:07:06

How to compile a program for Windows from under Linux?

Explain to the illiterate.
I wrote a python program in linux. How now to compile it into an exe file that works in windows?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Andrey Dugin, 2017-10-30
@dsgnfox

As already mentioned, Python is a cross-platform language. But if you really cannot do without *.exe, try the cx_Freeze library - the description says that it is platform-independent.
Also here is what the author himself writes here :

cx_Freeze is a set of scripts and modules for freezing Python scripts
into executables, in much the same way that py2exe and py2app do.
Unlike these two tools, cx_Freeze is cross platform and should work
on any platform that Python itself works on. It supports Python 2.7
or higher (including Python 3).

S
Saboteur, 2017-09-24
@saboteur_kiev

For python, there is no compiler in .exe under Linux, that is, in your case, no way.
PS There is such a thing for C++.

D
Dmitry, 2017-09-24
@LazyTalent

The easiest way is to install a virtual machine with Windows, but if simple paths are not for you, then install wine, install python under wine, and then you need to use pyinstaller (also under wine)

C
CityCat4, 2017-09-25
@CityCat4

Python is a pseudo-compiled language whose execution environment is provided by python.exe itself. If you want exactly exe - then no way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question