Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7902637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:33:12+00:00 2026-06-03T09:33:12+00:00

I’ve created a program using Python on Windows. How do you turn it into

  • 0

I’ve created a program using Python on Windows. How do you turn it into Linux executable? To be specific Linux Ubuntu 9.10.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:33:15+00:00Added an answer on June 3, 2026 at 9:33 am

    Tendou,

    Since I usually develop on a Linux machine, when I need a windows version I often use cx_freeze to make windows binaries, but I also used it to make Linux binaries and it works pretty well (it is multiplatform, something py2exe is not). Like Eli said above, it doesn’t really compile, but just bundles the interpreter, byte compiled code and needed libraries into an executable, but you’ll get what you want (running on a machine without python pre-installed).

    After having installed cx_freeze on a Linux machine, you can try it out with something simple, like this dummy code, which i saved as test.py:

    import time
    
    for i in range(10):
      print i
      time.sleep(1)
    

    Then run cxfreeze to make the binary. The output will look like this:

    $ cxfreeze test.py 
    copying /usr/lib/python2.6/site-packages/cx_Freeze/bases/Console -> /home/claudio/dist/test
    copying /usr/lib/libpython2.6.so.1.0 -> /home/claudio/dist/libpython2.6.so.1.0
    writing zip file /home/claudio/dist/test
    
      Name                      File
      ----                      ----
    m StringIO                  
    m UserDict                  
    m __builtin__               
    m __main__                  test.py
    m _abcoll                   
    m _codecs                   
    m _codecs_cn                /usr/lib/python2.6/lib-dynload/_codecs_cn.so
    m _codecs_hk                /usr/lib/python2.6/lib-dynload/_codecs_hk.so
    m _codecs_iso2022           /usr/lib/python2.6/lib-dynload/_codecs_iso2022.so
    m _codecs_jp                /usr/lib/python2.6/lib-dynload/_codecs_jp.so
    m _codecs_kr                /usr/lib/python2.6/lib-dynload/_codecs_kr.so
    m _codecs_tw                /usr/lib/python2.6/lib-dynload/_codecs_tw.so
    m _functools                /usr/lib/python2.6/lib-dynload/_functools.so
    m _locale                   /usr/lib/python2.6/lib-dynload/_locale.so
    m _multibytecodec           /usr/lib/python2.6/lib-dynload/_multibytecodec.so
    m _sre                      
    m _strptime                 /usr/lib/python2.6/_strptime.py
    m _struct                   /usr/lib/python2.6/lib-dynload/_struct.so
    m _warnings                 
    m abc                       
    m array                     /usr/lib/python2.6/lib-dynload/array.so
    m base64                    
    m binascii                  /usr/lib/python2.6/lib-dynload/binascii.so
    m bz2                       /usr/lib/python2.6/lib-dynload/bz2.so
    m cStringIO                 /usr/lib/python2.6/lib-dynload/cStringIO.so
    m calendar                  /usr/lib/python2.6/calendar.py
    m codecs                    
    m copy                      
    m copy_reg                  
    m cx_Freeze__init__         /usr/lib/python2.6/site-packages/cx_Freeze/initscripts/Console.py
    m datetime                  /usr/lib/python2.6/lib-dynload/datetime.so
    m dummy_thread              /usr/lib/python2.6/dummy_thread.py
    P encodings                 
    m encodings.aliases         
    m encodings.ascii           
    m encodings.base64_codec    
    m encodings.big5            
    m encodings.big5hkscs       
    m encodings.bz2_codec       
    m encodings.charmap         
    m encodings.cp037           
    m encodings.cp1006          
    m encodings.cp1026          
    m encodings.cp1140          
    m encodings.cp1250          
    m encodings.cp1251          
    m encodings.cp1252          
    m encodings.cp1253          
    m encodings.cp1254          
    m encodings.cp1255          
    m encodings.cp1256          
    m encodings.cp1257          
    m encodings.cp1258          
    m encodings.cp424           
    m encodings.cp437           
    m encodings.cp500           
    m encodings.cp737           
    m encodings.cp775           
    m encodings.cp850           
    m encodings.cp852           
    m encodings.cp855           
    m encodings.cp856           
    m encodings.cp857           
    m encodings.cp860           
    m encodings.cp861           
    m encodings.cp862           
    m encodings.cp863           
    m encodings.cp864           
    m encodings.cp865           
    m encodings.cp866           
    m encodings.cp869           
    m encodings.cp874           
    m encodings.cp875           
    m encodings.cp932           
    m encodings.cp949           
    m encodings.cp950           
    m encodings.euc_jis_2004    
    m encodings.euc_jisx0213    
    m encodings.euc_jp          
    m encodings.euc_kr          
    m encodings.gb18030         
    m encodings.gb2312          
    m encodings.gbk             
    m encodings.hex_codec       
    m encodings.hp_roman8       
    m encodings.hz              
    m encodings.idna            
    m encodings.iso2022_jp      
    m encodings.iso2022_jp_1    
    m encodings.iso2022_jp_2    
    m encodings.iso2022_jp_2004 
    m encodings.iso2022_jp_3    
    m encodings.iso2022_jp_ext  
    m encodings.iso2022_kr      
    m encodings.iso8859_1       
    m encodings.iso8859_10      
    m encodings.iso8859_11      
    m encodings.iso8859_13      
    m encodings.iso8859_14      
    m encodings.iso8859_15      
    m encodings.iso8859_16      
    m encodings.iso8859_2       
    m encodings.iso8859_3       
    m encodings.iso8859_4       
    m encodings.iso8859_5       
    m encodings.iso8859_6       
    m encodings.iso8859_7       
    m encodings.iso8859_8       
    m encodings.iso8859_9       
    m encodings.johab           
    m encodings.koi8_r          
    m encodings.koi8_u          
    m encodings.latin_1         
    m encodings.mac_arabic      
    m encodings.mac_centeuro    
    m encodings.mac_croatian    
    m encodings.mac_cyrillic    
    m encodings.mac_farsi       
    m encodings.mac_greek       
    m encodings.mac_iceland     
    m encodings.mac_latin2      
    m encodings.mac_roman       
    m encodings.mac_romanian    
    m encodings.mac_turkish     
    m encodings.mbcs            
    m encodings.palmos          
    m encodings.ptcp154         
    m encodings.punycode        
    m encodings.quopri_codec    
    m encodings.raw_unicode_escape 
    m encodings.rot_13          
    m encodings.shift_jis       
    m encodings.shift_jis_2004  
    m encodings.shift_jisx0213  
    m encodings.string_escape   
    m encodings.tis_620         
    m encodings.undefined       
    m encodings.unicode_escape  
    m encodings.unicode_internal 
    m encodings.utf_16          
    m encodings.utf_16_be       
    m encodings.utf_16_le       
    m encodings.utf_32          
    m encodings.utf_32_be       
    m encodings.utf_32_le       
    m encodings.utf_7           
    m encodings.utf_8           
    m encodings.utf_8_sig       
    m encodings.uu_codec        
    m encodings.zlib_codec      
    m errno                     
    m functools                 /usr/lib/python2.6/functools.py
    m genericpath               
    m gettext                   /usr/lib/python2.6/gettext.py
    m imp                       
    m itertools                 /usr/lib/python2.6/lib-dynload/itertools.so
    m linecache                 
    m locale                    /usr/lib/python2.6/locale.py
    m operator                  /usr/lib/python2.6/lib-dynload/operator.so
    m optparse                  /usr/lib/python2.6/optparse.py
    m os                        
    m posix                     
    m posixpath                 
    m pwd                       
    m quopri                    
    m re                        /usr/lib/python2.6/re.py
    m repr                      
    m sre_compile               /usr/lib/python2.6/sre_compile.py
    m sre_constants             /usr/lib/python2.6/sre_constants.py
    m sre_parse                 /usr/lib/python2.6/sre_parse.py
    m stat                      
    m string                    /usr/lib/python2.6/string.py
    m stringprep                
    m strop                     /usr/lib/python2.6/lib-dynload/strop.so
    m struct                    
    m sys                       
    m textwrap                  /usr/lib/python2.6/textwrap.py
    m thread                    
    m time                      /usr/lib/python2.6/lib-dynload/time.so
    m token                     /usr/lib/python2.6/token.py
    m tokenize                  /usr/lib/python2.6/tokenize.py
    m traceback                 
    m types                     
    m unicodedata               /usr/lib/python2.6/lib-dynload/unicodedata.so
    m warnings                  
    m zipimport                 
    m zlib                      /usr/lib/python2.6/lib-dynload/zlib.so
    
    copying /usr/lib/python2.6/lib-dynload/_codecs_cn.so -> /home/claudio/dist/_codecs_cn.so
    copying /usr/lib/python2.6/lib-dynload/_codecs_hk.so -> /home/claudio/dist/_codecs_hk.so
    copying /usr/lib/python2.6/lib-dynload/_codecs_iso2022.so -> /home/claudio/dist/_codecs_iso2022.so
    copying /usr/lib/python2.6/lib-dynload/_codecs_jp.so -> /home/claudio/dist/_codecs_jp.so
    copying /usr/lib/python2.6/lib-dynload/_codecs_kr.so -> /home/claudio/dist/_codecs_kr.so
    copying /usr/lib/python2.6/lib-dynload/_codecs_tw.so -> /home/claudio/dist/_codecs_tw.so
    copying /usr/lib/python2.6/lib-dynload/_functools.so -> /home/claudio/dist/_functools.so
    copying /usr/lib/python2.6/lib-dynload/_locale.so -> /home/claudio/dist/_locale.so
    copying /usr/lib/python2.6/lib-dynload/_multibytecodec.so -> /home/claudio/dist/_multibytecodec.so
    copying /usr/lib/python2.6/lib-dynload/_struct.so -> /home/claudio/dist/_struct.so
    copying /usr/lib/python2.6/lib-dynload/array.so -> /home/claudio/dist/array.so
    copying /usr/lib/python2.6/lib-dynload/binascii.so -> /home/claudio/dist/binascii.so
    copying /usr/lib/python2.6/lib-dynload/bz2.so -> /home/claudio/dist/bz2.so
    copying /usr/lib/python2.6/lib-dynload/cStringIO.so -> /home/claudio/dist/cStringIO.so
    copying /usr/lib/python2.6/lib-dynload/datetime.so -> /home/claudio/dist/datetime.so
    copying /usr/lib/python2.6/lib-dynload/itertools.so -> /home/claudio/dist/itertools.so
    copying /usr/lib/python2.6/lib-dynload/operator.so -> /home/claudio/dist/operator.so
    copying /usr/lib/python2.6/lib-dynload/strop.so -> /home/claudio/dist/strop.so
    copying /usr/lib/python2.6/lib-dynload/time.so -> /home/claudio/dist/time.so
    copying /usr/lib/python2.6/lib-dynload/unicodedata.so -> /home/claudio/dist/unicodedata.so
    copying /usr/lib/python2.6/lib-dynload/zlib.so -> /home/claudio/dist/zlib.so
    

    Note that with bigger projects you might get “Missing modules” errors. If you are sure they are installed, you can manually point them to cx_freeze using the –include-modules switch. See cxfreeze –help for the full help.

    You can also make a setup.py file which makes “cxfreezing” resemble the way we usually install python packages, instead of doing it directly from the command line. This article even does that for a wxPython project, which might be similar to yours:
    A cx_Freeze Tutorial – Build a Binary Series!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.