解决py2exe error: MSVCP90.dll: No such file or directory
其实只要在windows目录下搜索MSVCP90.dll这个文件,然后拷到python安装目录下就可以了
利用py2exe生成exe文件时 如果缺少MSVCP90.dll会提示
*** finding dlls needed *** error: MSVCP90.dll: No such file or directory 解决办法是在脚本中加入
"dll_excludes": ["MSVCP90.dll"], 具体代码如下:
-
# setup.py
-
from distutils.core import setup
-
import py2exe
-
-
setup(
-
options = {
-
"py2exe": {
-
"dll_excludes": ["MSVCP90.dll"],
-
}
-
},
-
windows=[{"script": "D:/Python27/workspase/t1.py"}] #t1.py的路径
-
)
# -*- coding: utf-8 -*-
#windows 无控制台
#console 有控制台
from distutils.core import setup
import py2exe
setup(version = "1.0",description = "QQ:",name = "STCP",zipfile=None,windows=[{"script": "STCP.py", "icon_resources": [(1, "App.ico")]}],options={"py2exe":{"dll_excludes":["MSVCP90.dll"],"includes":["sip"]}},includes = ["ini.py"])