How To Install Py2exe In Ubuntu

0920

Jan 29, 2010  I'm having trouble installing py2exe on ubuntu 9.10 64 bit. I get these errors when I run python setup.py build. I'm not sure what the issue is or how to fix it. Thank you in advance. I get these errors when I run python setup.py build. I'm not sure what the issue is or how to fix it. Thank you in advance.

Given:
- Ubuntu
- py2exe and pyinstaller- Python script with setup.py (or else)

Need:
- One .exe file and maybe some .dll (I realy don't know)

How To Install Py2exe In Ubuntu

Steps what I did:
- setup pip3 and python 3.4 (https://askubuntu.com/questions/524399/issues-with-py2exe)
- setup py2exe for ubuntu 'pip3 install py2exe'
- run 'python3.4 setup.py py2exe' And got following traceback:

Py2exe


- setup pyinstaller for ubuntu (https://github.com/pyinstaller/pyinstaller/wiki)
- run 'pyinstaller setup.py'(same as 'pyinstaller -w setup.py') and got in dist folder many files with extension .so and one file 'setup' without extension Compat wireless 3.6.8 1 snpc tar bz2.

What am I doing wrong?
How can I get .exe file under Ubuntu?
Is it possible?

Install Py2exe Python 3

PS: I've read Python executables: py2exe or PyInstaller? by I didn't find answer.

Community
How To Install Py2exe In Ubuntu
Yuriy LeonovYuriy Leonov

1 Answer

You cannot use py2exe on Ubuntu or Linux in general. You cannot use it on Mac either. It is a Windows-only utility! You have to use it within Windows, whether that be in a Windows virtual machine or an actual Windows machine.

As for PyInstaller, please read the docs:

Can I use PyInstaller as a cross-compiler?

  • Can I package Windows binaries while running under Linux?

    No, this is not supported. Please use Wine for this, PyInstaller runs fine in Wine. You may also want to have a look at this thread in the mailinglist. In version 1.4 we had build in some support for this, but it showed to work only half. It would require some Windows system on another partition and would only work for pure Python programs. As soon as you want a decent GUI (gtk, qt, wx), you would need to install Windows libraries anyhow. So it's much easier to just use Wine. - source

Mike DriscollMike Driscoll

Not the answer you're looking for? Browse other questions tagged pythonwindowsubuntupy2exepyinstaller or ask your own question.

This entry was posted on 20.09.2019.