OK, so I'm a newbie. Please have understanding for my possible stupid questions.

I wrote a script which is retrieving some input from user, storing it into a file and than e-mails that file to me. All of that is working fine when I run *.py file. Data is stored, mail is sent. Everything looks perfect.But, when trying to build executable I receive error message - "Import Error: No module named multipart". I tried removing the mail part from the script and than it successfully builds and program is working, as far as is retrieving data and storing to a file concerned.

One more thing to add, I managed to build executable under Linux, but since most of my possible users would use Windows I need to make *.exe file.To summarise: *.py file is working both on Windows and Linux, while I only managed to build executable on Linux. I used cx_freeze for building.

Ok. I used slightly different setup script, but now I've tried using that one from your link to cx_freeze's site with no additional options included. Now building is successful, but still getting the same error code when I start the built application. Here's the error message as attachment. Btw, main.py is my application script and line 6 says "from email.MIMEMultipart import MIMEMultipart". Thx!

Actually, I wrote the script on Linux in Python 3.3, but since there's no PyGtk for Windows which is compatible with Python 3.3, I had to install py2.7 with pygtk2.7 and cx_freeze 2.7 to be able to run it on win. Maybe that could be the problem, but like I said in my first post - my script is doing fine when I run it from python shell - data stored, mail is sent. The problem arises when I try to build it. P.S. I could provide my full code but I just wanted to keep things simple as possible, since there's a only a lot of PyGtk stuff (labels, entries, buttons..). Salud!

Rather than sending us the code you have now, you could take your local copy and reduce it and keep trying to build it until you've got the very least amount possible to reproduce your problem. (Sometimes doing this helps you find out exactly what the problem is and you don't need us; posting the solution would be appreciated!) You should probably start with the GUI (GTK) code (well-written code typically separates the logic from the interface, so if it's not easy, then you'll learn about what you would want in the future). Once you've got the minimalist problem, please post the exact code of your program and the build script as well as a description of the exact configuration that you have that is the problem - Python version, cxfreeze version, OS, whatever else might be useful.

Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.

Well, I'll keep trying to solve the problem on my own, but if someone has enough time to take a look - here's my whole work.

1) My script (simplified). As a script file when ran from python shell, fully working both on Linux Mint Nadia and Windows 7 64bit. When built, only working on Linux - Windows displays MIME error which I included in previous posts.Note that I tried changing python path (first line in code) to C:\Python27 when building in Windows. Doesn't work either.

Ok, I tried adding that line, but it isn't helping. It says it is not a recognized module, skips it and keeps building the same way as before. I realize there are some options that I can configure in build script, but my program is very simple and I don't need anything special - just a simple .exe file. The error looks to me like it's pointing to some problem with Python27 libraries. But again, that's not explaining why am I able to run the script properly from Python shell. I would appreciate if someone who's using Python 2.7 could try building my script on his system. Maybe you'll see something I don't see.. Thank you!

Alright! The script didn't work for me again, but it pushed me forward to uninstall python and all of it's components, clear system registry and install everything all over again. And it worked then! Thank you for all of your support, finally did it!Now I have one more thing that bothers me. Is it possible to somehow build a single executable that would work without all the dll's and pyd's and stuff? Thank you and please, forgive my ignorance.