Import error while running python application on Mac OS

H

hisan

HI All,

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.

Please let me know how to resolve my issue
 
H

hisan

HI All,

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.

Please let me know how to resolve my issue

Can Some one reply for this Please
 
N

Ned Deily

hisan said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top