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 py2exe
setup(windows=[‘hello.py'],
options = {
"py2exe": {
"dll_excludes":
["MSVCP90.dll"]
}
},
)
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"]
}
},
)

A useful tools in windows py2exe(optional)

  • 1.
  • 2.
    PY2EXE: CREATE YOUR EXEFILE IN WINDOWS
  • 3.
    Install it fromPYPI • Use pip or easy_install install the py2exe module
  • 4.
    Create your firstprogram • Write python file hello.py #hello.py print “hello,world” • Write the setup.py under same dir
  • 5.
    • Run yoursetup script >>> Python setup.py py2exe • Run the hello.exe file under dist
  • 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.
    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"] } }, )