症状:TF400422, TF400423, TF400424: Failed to open in Microsoft Excel (Project, Outlook): Unable to cast COM object of type 'Microsoft.Office.Interop.Excel(Project, Outlook).ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Applicatio
旧的pip文件内容如下: from pip import main if __name__ == '__main__': sys.exit(main()) 修改后的文件内容: from pip import __main__ if __name__ == '__main__': sys.exit(__main__._main()) pip安装软件或模块时提示cannot import name 'main' 原文地址:https://www.cnblogs.com/ameile/p/104520