你可以将项目的某些关键模块用c来写,然后使用ctypes包导入python中使用。 1. 导入自定义C代码 http://stackoverflow.com/a/5082294/4902900 2. 教程 https://docs.python.org/3/library/ctypes.html