467,074 Members | 928 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,074 developers. It's quick & easy.

HELP! py2exe error - No module named decimal

I've just completed a project using the following (Windows XP, python
2.4.1, wxpython 2.6, and pymssql 0.7.3). The program runs great, but
after I convert it to an exe (required for this project), it gives me
the following error when I try to run it.

Traceback (most recent call last):
File "EstUpdate.py", line 6, in ?
File "frmSplash.pyc", line 9, in ?
File "pymssql.pyc", line 23, in ?
File "_mssql.pyc", line 9, in ?
File "_mssql.pyc", line 7, in __load
ImportError: No module named decimal

However, when I look in c:\python24\lib on the machine which ran py2exe,
I see decimal.py and decimal.pyc.

Can someone please help with this? I'm supposed to start testing the
program today and I can't seem to move past this first step.

Thanks!!
Chris
Oct 21 '05 #1
  • viewed: 9634
Share:
2 Replies
FYI there is a separate newsgroup for py2exe at
gmane.comp.python.py2exe. You may want to post
there also.

Just as a suggestion, put an import decimal at
the top of your program. It looks like _mssql
might be doing dynamic imports in __load method
which will "confuse" py2exe because it can't
know about dynamic imports which happen at
runtime.

-Larry Bates

Chris wrote:
I've just completed a project using the following (Windows XP, python
2.4.1, wxpython 2.6, and pymssql 0.7.3). The program runs great, but
after I convert it to an exe (required for this project), it gives me
the following error when I try to run it.

Traceback (most recent call last):
File "EstUpdate.py", line 6, in ?
File "frmSplash.pyc", line 9, in ?
File "pymssql.pyc", line 23, in ?
File "_mssql.pyc", line 9, in ?
File "_mssql.pyc", line 7, in __load
ImportError: No module named decimal

However, when I look in c:\python24\lib on the machine which ran py2exe,
I see decimal.py and decimal.pyc.

Can someone please help with this? I'm supposed to start testing the
program today and I can't seem to move past this first step.

Thanks!!
Chris

Oct 21 '05 #2
That was it.

Thank you so much!

Chris

In article <43**************@websafe.com>, la*********@websafe.com
says...
FYI there is a separate newsgroup for py2exe at
gmane.comp.python.py2exe. You may want to post
there also.

Just as a suggestion, put an import decimal at
the top of your program. It looks like _mssql
might be doing dynamic imports in __load method
which will "confuse" py2exe because it can't
know about dynamic imports which happen at
runtime.

-Larry Bates

Chris wrote:
I've just completed a project using the following (Windows XP, python
2.4.1, wxpython 2.6, and pymssql 0.7.3). The program runs great, but
after I convert it to an exe (required for this project), it gives me
the following error when I try to run it.

Traceback (most recent call last):
File "EstUpdate.py", line 6, in ?
File "frmSplash.pyc", line 9, in ?
File "pymssql.pyc", line 23, in ?
File "_mssql.pyc", line 9, in ?
File "_mssql.pyc", line 7, in __load
ImportError: No module named decimal

However, when I look in c:\python24\lib on the machine which ran py2exe,
I see decimal.py and decimal.pyc.

Can someone please help with this? I'm supposed to start testing the
program today and I can't seem to move past this first step.

Thanks!!
Chris

Oct 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Tom | last post: by
2 posts views Thread by Sudheer Kareem | last post: by
6 posts views Thread by d.warnermurray | last post: by
7 posts views Thread by Corepaul | last post: by
5 posts views Thread by Steve | last post: by
8 posts views Thread by Mark | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.