Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Vista + Python = Screwd? Calling python experts!


  • Please log in to reply

#1
MaxHit

MaxHit

    New Member

  • Member
  • Pip
  • 5 posts
I need a tutorial on how to turn a .py script into an .exe file using py2exe. Ive tryed windows xp tutorials but i cant get it to work. I have everyhting set up, my setup.py is good and i have my hello.py ready. When i type " start setup.py py2exe" in my DOS window it says "Import Error: No module named py2exe. I think it might be because im running vista. Help please. (Oh and i am not an advanced programmer so try to keep it simple.)
Thx in advanced guys :)

Edited by MaxHit, 24 April 2008 - 07:40 PM.

  • 0

Advertisements


#2
Titan8990

Titan8990

    Member

  • Member
  • PipPipPipPipPip
  • 2,189 posts
I believe this is the tutorial you are looking for: http://www.py2exe.or...ex.cgi/Tutorial.
  • 0

#3
MaxHit

MaxHit

    New Member

  • Topic Starter
  • Member
  • Pip
  • 5 posts
Thx for the tut. I followed it twice and still got the same error(When i type " start setup.py py2exe" in my DOS window it says "Import Error: No module named py2exe.).
I think i might not have py2exe insatlled properly, is there a tutorial to install it? Or a way to check if it is installed?
  • 0

#4
MaxHit

MaxHit

    New Member

  • Topic Starter
  • Member
  • Pip
  • 5 posts
Woot! Third times a charm!
I got all the way to where i ran my setup.py...
The error was...
c:\Python25\py2exe-0.6.6>setup1.py py2exe
running py2exe
*** searching for required modules ***
*** parsing results ***
creating python loader for extension 'unicodedata'
creating python loader for extension 'bz2'
*** finding dlls needed ***
Traceback (most recent call last):
File "C:\Python25\py2exe-0.6.6\setup1.py", line 4, in <module>
setup(console=['hello.py'])
File "C:\Python25\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Python25\lib\distutils\dist.py", line 974, in run_commands
self.run_command(cmd)
File "C:\Python25\lib\distutils\dist.py", line 994, in run_command
cmd_obj.run()
File "C:\Users\Daniel Favor\Desktop\Caleb\py2exe-0.6.6\py2exe-0.6.6\py2exe\bui
ld_exe.py", line 223, in run
File "C:\Users\Daniel Favor\Desktop\Caleb\py2exe-0.6.6\py2exe-0.6.6\py2exe\bui
ld_exe.py", line 283, in _run
File "C:\Users\Daniel Favor\Desktop\Caleb\py2exe-0.6.6\py2exe-0.6.6\py2exe\bui
ld_exe.py", line 367, in find_dlls
File "C:\Users\Daniel Favor\Desktop\Caleb\py2exe-0.6.6\py2exe-0.6.6\py2exe\bui
ld_exe.py", line 925, in find_dependend_dlls
ImportError: No module named py2exe_util


I think it might be because i didnt install my py2exe properly, how do you install?(There is no installer in derectory)

Edited by MaxHit, 25 April 2008 - 06:11 PM.

  • 0

#5
MaxHit

MaxHit

    New Member

  • Topic Starter
  • Member
  • Pip
  • 5 posts
Well i assumed that i had to run setup.py thats in py2exe folder to install it... BUT, it get this error

error: Python was built with visual studio 2003;
visual studio was not found on your computer. If you have cygwin installed compile with ming32, by passing "c- ming32" to setup.py.

i shortend it a bit but has all important things

Anyway i went out to download visual studio...I downloaded VS 2005 and tryed again! Same error.
Do i need the 2003 version?

Man this is so weird and messed up need help plz guys.
(Sry for triple post :))
  • 0

#6
MaxHit

MaxHit

    New Member

  • Topic Starter
  • Member
  • Pip
  • 5 posts
I have everythin setup...When i run my setup.py i get this.(Im running vista)
I have found this same error posted on 5 different forums without answer.
If somone could figure this our i think it would be very helpful for many people.
running py2exe
*** searching for required modules ***
*** parsing results ***
creating python loader for extension 'unicodedata'
creating python loader for extension 'bz2'
*** finding dlls needed ***
Traceback (most recent call last):
File "C:\Users\Daniel Favor\Desktop\mycode\setup.py", line 4, in <module>
setup(console = ["hello.py"])
File "C:\Python25\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Python25\lib\distutils\dist.py", line 974, in run_commands
self.run_command(cmd)
File "C:\Python25\lib\distutils\dist.py", line 994, in run_command
cmd_obj.run()
File "C:\Python25\lib\site-packages\py2exe\build_exe.py", line 223, in run
self._run()
File "C:\Python25\lib\site-packages\py2exe\build_exe.py", line 283, in _run
dlls = self.find_dlls(extensions)
File "C:\Python25\lib\site-packages\py2exe\build_exe.py", line 367, in find_dl
ls
self.dll_excludes)
File "C:\Python25\lib\site-packages\py2exe\build_exe.py", line 925, in find_de
pendend_dlls
import py2exe_util
ImportError: DLL load failed with error code 193
(Window pops up saying)
C:\python25\site-packages\py2exe\py2exe_util.pyd is either not designed to run on windos or it contains an error.
Try installing the program again using the original installation media or contact you system admin or software vendor for support.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP