PYTHON: SOME USEFUL
TOOLS
John
Saturday, December 21, 2013
PY2EXE: CREATE
YOUR EXE FILE IN
WINDOWS
Install it from PYPI
• Use pip or easy_install install the py2exe
module
Create your first program
• Write python file hello.py
#hello.py
print “hello,world”
• Write the setup.py under same dir
• Run your setup script
>>> Python setup.py py2exe
• Run the hello.exe file under dist
if you meet “error: MSVCP90.dll:
No such file or directory”
Change the setup file
from distutils.core import setup
import ...
if you meet “error: MSVCP90.dll:
No such file or directory”
Change the setup file
from distutils.core import setup
import ...
Upcoming SlideShare
Loading in...5
×

A useful tools in windows py2exe(optional)

345

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
345
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
6
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

A useful tools in windows py2exe(optional)

  1. 1. PYTHON: SOME USEFUL TOOLS John Saturday, December 21, 2013
  2. 2. PY2EXE: CREATE YOUR EXE FILE IN WINDOWS
  3. 3. Install it from PYPI • Use pip or easy_install install the py2exe module
  4. 4. Create your first program • Write python file hello.py #hello.py print “hello,world” • Write the setup.py under same dir
  5. 5. • Run your setup script >>> Python setup.py py2exe • Run the hello.exe file under dist
  6. 6. if you meet “error: MSVCP90.dll: No such file or directory” Change the setup file from distutils.core import setup import py2exe setup(windows=[‘hello.py'], options = { "py2exe": { "dll_excludes": ["MSVCP90.dll"] } }, )
  7. 7. if you meet “error: MSVCP90.dll: No such file or directory” Change the setup file from distutils.core import setup import py2exe setup(windows=[‘hello.py'], options = { "py2exe": { "dll_excludes": ["MSVCP90.dll"] } }, )
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×