*.pyc命令:python - m py_comple file.py 脚本:import py_compilepy_compile.compile('module.py' , 'module.pyc') *.pyo 或 opt命令:python - O - m py_compile module.py 转载于:https://www.cnblogs.com/hizf/p/7473903.html