a useful tools in windows py2exe(optional)

6
PYTHON: SOME USEFUL TOOLS John Sunday, August 28, 2022

Upload: john-zhang

Post on 23-Jun-2015

311 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: A useful tools in windows py2exe(optional)

PYTHON: SOME USEFUL TOOLS

JohnThursday, April 13, 2023

Page 2: A useful tools in windows py2exe(optional)

PY2EXE: CREATE YOUR EXE FILE IN WINDOWS

Page 3: A useful tools in windows py2exe(optional)

Install it from PYPI

• Use pip or easy_install install the py2exe module

Page 4: A useful tools in windows py2exe(optional)

Create your first program

• Write python file hello.py#hello.pyprint “hello,world”

• Write the setup.py under same dir

Page 5: A useful tools in windows py2exe(optional)

• Run your setup script>>> Python setup.py py2exe• Run the hello.exe file under dist

Page 6: A useful tools in windows py2exe(optional)

if you meet “error: MSVCP90.dll: No such file or directory”

Change the setup filefrom distutils.core import setupimport py2exesetup(windows=[‘hello.py'], options = { "py2exe": { "dll_excludes": ["MSVCP90.dll"] } }, )