Path: csiph.com!usenet.pasdenom.info!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'binary': 0.05; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'subject:module': 0.09; 'cc:addr:python-list': 0.10; 'subject:error': 0.11; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'conditional': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'message-id:@fido.openend.se': 0.16; 'modules,': 0.16; 'received:89.233': 0.16; 'received:89.233.217': 0.16; 'received:89.233.217.133': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'subject:import': 0.16; 'laura': 0.18; 'shell': 0.18; 'windows': 0.20; 'cc:addr:python.org': 0.21; 'trying': 0.22; 'cc:2**1': 0.22; 'correctly.': 0.22; '2015': 0.23; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'script': 0.25; 'asked': 0.28; "doesn't": 0.28; 'this.': 0.28; 'received:se': 0.29; 'cc:no real name:2**1': 0.29; 'starts': 0.29; 'fri,': 0.31; 'source': 0.31; 'url:mailman': 0.31; 'especially': 0.32; 'post': 0.32; 'url:python': 0.33; 'problem': 0.33; 'clarify': 0.33; 'skip:- 10': 0.34; 'url:listinfo': 0.35; 'but': 0.36; 'url:org': 0.36; 'there': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'skip:i 20': 0.37; 'someone': 0.38; 'build': 0.40; 'why': 0.40; 'your': 0.60; 'behavior': 0.61; 'header:Message-Id:1': 0.62; 'more': 0.62; 'you.': 0.64; 'phone': 0.67; 'received:89': 0.80; 'source?': 0.91 To: Sreenath Nair cc: python-list@python.org, lac@openend.se From: Laura Creighton Subject: Re: Cx_freeze centOS module import error In-Reply-To: Message from Sreenath Nair of "Fri, 22 May 2015 11:31:12 +0530." References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1263.1432301739.1@fido> Content-Transfer-Encoding: quoted-printable Date: Fri, 22 May 2015 15:35:39 +0200 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [89.233.217.130]); Fri, 22 May 2015 15:35:40 +0200 (CEST) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1432301747 news.xs4all.nl 2944 [2001:888:2000:d::a6]:37966 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91039 In a message of Fri, 22 May 2015 11:31:12 +0530, Sreenath Nair writes: >I'm trying to build a script into a binary using cx_freeze. Problem is th= at once the binary is built then it starts throwing ImportError....Invokin= g the source via shell works fine. Can someone clarify why this behavior w= hen freezing the source? > >Thank you. > >Sent from my Windows Phone >-- = >https://mail.python.org/mailman/listinfo/python-list If it cannot import any modules, then chances are you have not asked it to. Post your setup.py, because there is more than one way to do this. But sometimes, especially with conditional imports, it just doesn't get it correctly. cx_freeze --include-modules will force it to include it. Laura