Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #7313

Re: Import error while running python application on Mac OS

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.01; 'instance': 0.05; 'subject:while': 0.07; 'python': 0.08; 'dependency': 0.09; 'libs': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'url:gmane': 0.09; 'subject:error': 0.11; 'wrote:': 0.14; 'subject:python': 0.14; 'binaries': 0.16; 'exe': 0.16; 'from:addr:acm.org': 0.16; 'os.': 0.16; 'py2app': 0.16; 'received:198.144': 0.16; 'subject:Mac': 0.16; 'using,': 0.16; 'subject:application': 0.16; 'traceback': 0.16; 'compatible': 0.16; '(i.e.': 0.17; 'convert': 0.19; 'guess': 0.19; 'trying': 0.23; 'deployment': 0.23; 'module,': 0.23; "user's": 0.23; 'versions': 0.23; 'runs': 0.23; 'libraries': 0.25; 'specify': 0.25; 'modules': 0.26; 'saying': 0.26; 'windows': 0.26; 'script': 0.27; 'installed': 0.28; 'possible,': 0.29; 'import': 0.29; 'combination': 0.29; 'fine.': 0.29; 'version': 0.29; 'unable': 0.30; 'module': 0.30; 'bundle': 0.30; 'app': 0.32; 'received:198': 0.32; 'header:X-Complaints-To:1': 0.32; 'to:addr :python-list': 0.33; 'external': 0.33; 'machine': 0.33; 'list.': 0.33; 'error': 0.33; 'install': 0.34; 'source': 0.34; 'there': 0.35; 'header:User-Agent:1': 0.35; 'url:comp': 0.35; 'using': 0.35; 'open': 0.36; 'created': 0.36; 'reasons': 0.37; 'url:python': 0.38; 'received:org': 0.38; 'url:org': 0.38; 'run': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'some': 0.38; 'should': 0.39; 'client': 0.39; 'header:Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'getting': 0.40; 'error.': 0.40; 'more': 0.60; 'your': 0.60; 'reply': 0.63; 'exact': 0.65; 'supply': 0.69; 'targeted': 0.74; 'article': 0.76; 'packaged': 0.84; 'subject:Import': 0.84; 'url:dir': 0.84; 'suppliers.': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Ned Deily <nad@acm.org>
Subject Re: Import error while running python application on Mac OS
Date Thu, 09 Jun 2011 12:34:45 -0700
References <ce14c481-f180-48fc-b38a-57d139a357f8@e17g2000prj.googlegroups.com> <1167f414-8901-4f9c-9d51-2723213fd036@k3g2000prl.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host baybryj.net
User-Agent MT-NewsWatcher/3.5.3b3 (PPC Mac OS X)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.59.1307648104.11593.python-list@python.org> (permalink)
Lines 37
NNTP-Posting-Host 82.94.164.166
X-Trace 1307648104 news.xs4all.nl 49177 [::ffff:82.94.164.166]:38992
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:7313

Show key headers only | View raw


In article 
<1167f414-8901-4f9c-9d51-2723213fd036@k3g2000prl.googlegroups.com>,
 hisan <santosh.ssit@gmail.com> wrote:

> On Jun 8, 9:20 pm, hisan <santosh.s...@gmail.com> wrote:
> > I have created an application for Mac OS using py2app module, in my
> > python script i have external modules such as MySQLdb and other ,
> > while trying to run on Mac OS i get an error saying unable to import
> > the module MySQLdb.
> > On Windows i convert python script to an exe using py2exe module and
> > if i install VC++ on y machine my exe runs fine.
> > Is there any dependency on MAC OS.
> Can Some one reply for this Please

You will want to ask questions about Python on Mac OS X on the Pythonmac 
list.

http://dir.gmane.org/gmane.comp.python.apple

But you need to supply more information.  There are many reasons why you 
might get an import error.  You should supply the exact traceback from 
the failing import and say which Python instance you are using, which 
version of MySQLdb, which set of MySQL client libraries - all of which 
need to be built compatibly (i.e. compatible CPU archs and deployment 
targets) and packaged in the app bundle or installed externally on the 
end user's machine.  You need to specify what version of OS X you are 
using and what range of OS X versions your app is targeted for.  And you 
should say whether everything works without trying to use py2app.  
Getting a working combination of python, MySQLdb, and MySQL client libs 
on OS X can be frustrating if you try to guess at it or use binaries 
from different suppliers.  If possible, use a complete solution from a 
3rd-party open source packager, like MacPorts or Homebrew.

-- 
 Ned Deily,
 nad@acm.org

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Import error while running python application on Mac OS hisan <santosh.ssit@gmail.com> - 2011-06-08 09:20 -0700
  Re: Import error while running python application on Mac OS hisan <santosh.ssit@gmail.com> - 2011-06-09 10:16 -0700
    Re: Import error while running python application on Mac OS Ned Deily <nad@acm.org> - 2011-06-09 12:34 -0700

csiph-web