Home > No Module > Py2exe Import Error

Py2exe Import Error


but i want to give the app to myfriends without the python program what should be done

SourceForge Browse Enterprise Blog Deals Help Create Log In or Join Solution Centers Mathematics tenure-track committees: Mathjobs question How does break enchantment work on stone shaped wall? I never managed to get my OS X app running from a Python project. from distutils.core import setup import py2exe setup(windows=['main.py'], options={"py2exe": {"includes": ["sip", "PyQt4.QtGui"]}}) 1234 from distutils.core import setupimport py2exesetup(windows=['main.py'], options={"py2exe": {"includes": ["sip", "PyQt4.QtGui"]}}) The first thing you might notice is that we changed Check This Out

Great write up, thanks for taking the time to post it! Sorry, I'm still fairly new to python. If that is not the case just use C:\Python27\python.exe setup.py py2exe. Most of the external dependencies solved themselves for me in my python twitter client.

Py2exe Importerror No Module Named

I will try these commands. Does py2exe requires that? –Reshure Aug 13 '09 at 11:24 Try python --version to make absolutely sure you're running Python 2.6. –Michael Mior Aug 13 '09 at 11:25 Then you can use py2exe. I understand that I can withdraw my consent at any time.

However it is not backwards-compatible: if you create the executable in Windows 7 it is not going to run on Windows XP. What this does is that it runs a windows application with no console. It also shows how to build a Mac version of your PyQt Python script. Py2exe Missing Modules Readline Would be interesting.

python py2exe share|improve this question edited Aug 13 '09 at 11:21 asked Aug 13 '09 at 11:14 Reshure 1,79942024 have you installed setup_tools ? –Geo Aug 13 '09 at Traveling Pumpkin Problem Misuse of parentheses for multiplication Is this diffeomorphism on standard two sphere an isometry? Here's what one of my setup scripts looks like: # py2exe specific setup options py2exeOptions = { 'dll_excludes':dllExcludes, 'excludes':['_gtk','_gtkcairo'], 'compressed':1, 'dist_dir':os.path.join(outDir,'mydest'), 'includes': ['foo','bar','baz'], 'packages' : ['matplotlib','mako','yaml','pytz'], } # all setup options http://stackoverflow.com/questions/11274596/import-error-when-building-python-using-py2exe Does anyone know how i can package all of the stuff i import? 0 Freaky_Chris 299 7 Years Ago This is a common problem, it seems you have to manually include

It turned out that my installation of CollabNet SVN contained an old version of Python that interfered with my recent Python2.7 installation. Importerror No Module Named Py2exe Ubuntu To generate the executable go to the folder where your main.py and setup.py file is located and type: "python setup.py py2exe". Then when I typed the -help. I believe the default Python installation is determined from a registry setting.

  • Join them; it only takes a minute: Sign up ImportError: no module named py2exe up vote 9 down vote favorite I get this error when I try to use one of
  • If you have installed Python the installation application should find your python installation and you should have something that looks like the figure below.
  • There's several Python libraries to interact with Excel files, eg.
  • python compilation py2exe tweepy setup.py share|improve this question asked Nov 9 '14 at 7:08 Loops 56118 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted
  • The setup function receives a parameter console=['myscript.py'] telling py2exe that we have a console application called myscript.py.
  • Edit: I had python 3.1 installed first but removed it afterwards.
  • I made the file an executable and tried running it on the computer, but for some reason the prompt will open up and tell me that there is no module named
  • No, thanks Toggle navigation Tips & Tricks How Tos Libraries SQLAlchemy Django PySide / PyQt SQLite Android Scripting Layer (SL4A) Tutorials Encoding and Decoding Regular Expressions Classes Recipes Recursion Tools API

Py2exe Include Modules

Please don't use URL shorteners Posting code to this subreddit: Add 4 extra spaces before each line of code def fibonacci(): a, b = 0, 1 while True: yield a a, https://pythontips.com/2014/03/03/using-py2exe-the-right-way/ I had 64 bit Python and needed the 32 bit version. Py2exe Importerror No Module Named It is great to hear that this article can be of assistance. Py2exe The Following Modules Appear To Be Missing Read more… Update Jul 5, 2010 I found this guide at arstechnica.com named How-to: Deploying PyQt applications on Windows and Mac OS X.

Short term, try running your script explicitly with Python 2.6 like this: c:\Python26\python.exe setup.py ... his comment is here http://mikaelhalen.com Mikael Halén You're welcome! http://mikaelhalen.com Mikael Halén Thank you! When you're in the interactive shell (console / terminal), it's quicker just to type -z instead of --compress every time. Py2exe No Module Named Sip

So, would I have to type on the C:python33 cmd line: cxfreeze -target-name="HelloProgram.exe" ??? COBRACHOPPERGIRL Having to use a setup.py program is really gross and evil… if this were written properly, you should be able to compile your program.py directly, with py2exe program.py, which would You don't have to change directory, you can also use absolute paths: python C:Python33Scriptscxfreeze --target-name=Hello.exe --target-dir="D:Exercisesdist" "D:ExercisesHello.py" Michelle Thanks for your help. this contact form If you need more information about py2exe, visit the official site.

So I include Tweepy and try to compile it into an executable using the following Setup.py: from distutils.core import setup import py2exe setup( windows = [{"script": "main.py"}], options = {"py2exe":{"includes":["sip", "tweepy"]}} Py2exe Setup.py Example I already installed PIL 1.1.6, and i am … python with MySQLdb module 21 replies hi, i wrote the following program on python IDE. If there is the slightest chance that there is a good compiler program for Python 3.x I will stick with Python.

Good luck!

However, when I double-clicked the executed file it gave me the following message: Cannot import traceback module Exception: No module named ‘re' Original Exception: No module named ‘re' Are you making For me, it is important that I easily can distribute my applications and if you give someone who isn't as geeky as yourself some Python script they most probably won't know Michelle I used a cxfreeze setup script and it actually worked and made an execute file which was in the build directory, which also was created by the execute process. Py2exe Options Would it be ok to eat rice using spoon in front of Westerners?

The setup.py should contain the code shown below. The dashes in front of target (-target) and dir (-dir) confuse me. Do they refer to a directory? navigate here import py2exe ImportError: no module named py2exe I've installed py2exe with the installer, and I use python 2.6.

Replacing CollabNet SVN with VisualSVN (including a couple of reboots) did the trick. The cxfreeze is located in the Scripts directory in Python3.3. On my computer, I have it installed and I generated an exe yesterday without errors. Any directives that are in setup.py should be able to be put in your source file header, and be done with.

If you are in the directory D:Exercises then this would place the exe in D:Exercisesdist Not sure about Python 3.3, but in Python 3.4 cxfreeze is installed in C:Python34Scriptscxfreeze. I forgot to mention, that I am using Pyton 2.7. Can I only touch other creatures with spells such as Invisibility? "There is no well-ordered uncountable set of real numbers" What to do with my pre-teen daughter who has been out http://happyrain.org/ Emily Really nice work there Mike!

All Rights Reserved. Rearrange colors in BarChart Breaking effort on both Weak and Strong collision resistance hash values Can you chain Tempestuous magic and War Caster? Please don't fill out this field. Download and install py2exe py2exe is an open source Python extension that allowes you to create executable Windows applications that can run without having Python installed on the computer.

The lovely py2exe installer Step through the installation and py2exe should now be reachable from python. Browse other questions tagged python py2exe or ask your own question. Using as standard cmd.exe shell instead worked (given all paths and correctly installed versions of python). Which lane to enter on this roundabout? (UK) Was the Oceanic flight 815 pilot the only one attacked by the monster?

Read more… eHow has a guide much like this one but a bit simpler. The ones with one dash (-O) are switches and are typed probably in as is, but the ones with 2 dashes like -target, I am confused about.