解决py2exe error: MSVCP90.dll: No such file or directory

解决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"], 具体代码如下:

  1. # setup.py  

  2. from distutils.core import setup  

  3. import py2exe  

  4.   

  5. setup(  

  6.     options = {  

  7.       "py2exe": {  

  8.         "dll_excludes": ["MSVCP90.dll"],  

  9.       }  

  10.     },  

  11.     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"])

posted on 2013-04-17 09:53  网宗  阅读(532)  评论(0编辑  收藏  举报

糗乐网-糗事|乐事|天下事