问题1: show error: MSVCP90.dll: No such file or directory

创建生成exe文件的脚本添加:

import py2exe
from distutils.core import setup

setup(console=['temp.py'], options = { "py2exe":{"dll_excludes":["MSVCP90.dll"]}})

问题2:py2exe 运行失败2: matplotlib  相关dll缺失

经实验:

import py2exe
from distutils.core import setup

import matplotlib

# 相关dll:'libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll','libgdk_pixbuf-2.0-0.dll'
# create a UI app: use windows not console
setup(windows=['memory_monitor.py'],

options = { "py2exe":{"dll_excludes":["MSVCP90.dll",'libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll','libgdk_pixbuf-2.0-0.dll'],
'excludes': ['_gtkagg', '_tkagg'],
'packages' : ['matplotlib', 'pytz']}},

data_files=matplotlib.get_py2exe_datafiles()
)
#setup(console=['memory_monitor.py'])

问题3: 如何使用py2exe

1. 生成py2exe的操作文件,如:mysetup.py。 2. Command line运行如下命令:
python mysetup.py py2exe
上面的命令执行后将产生一个名为dist的子目录,其中包含了helloworld.exe,python24.dll,library.zip这些文件。
如果你的XXX.py脚本中用了已编译的C扩展模块,那么这些模块也会被拷贝在个子目录中,同样,所有的dll文件在运行时都是需要的,除了系统的dll文件。
dist子目录中的文件包含了你的程序所必须的东西,你应将这个子目录中的所有内容一起发布。

py2exe --- show error: MSVCP90.dll + matplotlib issues的更多相关文章

  1. py2exe error: [Errno 2] No such file or directory: 'MSVCP90.dll'

    使用 python setup.py py2exe 打包时出现 py2exe error: [Errno 2] No such file or directory: 'MSVCP90.dll' 解决方 ...

  2. ZZmsvcprt.lib(MSVCP90.dll) : error LNK2005:已经在libcpmtd.lib(xmutex.obj) 中定义 .的分析解决办法 (转)

    很久没有写程式设计入门知识的相关文章了,这篇文章要来谈谈程式库 (Library) 连结,以及关于 MSVC 与 CRT 之间的种种恩怨情仇. 如果你使用的作业系统是 Linux.Mac 或其他非 W ...

  3. win10 anaconda安装后使用报错“Original error was: DLL load failed: 找不到指定的模块”

    报错:Original error was: DLL load failed: 找不到指定的模块. 环境变量需要添加3个 然后就okay了.

  4. 无法找到msvcp90.dll的一个碰巧解决办法

     作者:朱金灿 来源:http://blog.csdn.net/clever101 上周同事使用VS2008编译一个C++的控制台工程.工程在release模式下可以编译成功,但是运行总是出现无法 ...

  5. 使用SevenZipSharp出现“Can not load 7-zip library or internal COM error! Message: DLL file does not exist.”的解决方案

    如果你是从nuget上下载安装的SevenZipSharp库,当你写好相应代码,兴冲冲的启动程序进行测试时,以下画面会让你受到当头一棒: 究其原因,是因为SevenZipSharp只是native 7 ...

  6. 安装gensim报错:Original error was: DLL load failed: 找不到指定的模块。 Command "python setup.py egg_info" failed with error code 1 in C:\Users\xubing\AppData\Local\Temp\pip-install-nta89iep\gensim\

    1.pip install --upgrade setuptools #安装或升级 2.如果是基于numpy的python 包,升级numpy pip install -U numpy 3.重新pip ...

  7. 使用py2exe打包你的py程序

    软件环境:python3.3.4 + PyQt5 使用py2exe打包写好的py文件,过程如下: 在你要打包的代码文件(比如sample.py)的同文件夹建立一个python代码文件(比如setup. ...

  8. Python使用wxPython、py2exe编写桌面程序-乾颐堂

    Python是支持可视化编程,即编写gui程序,你可以用它来编写自己喜欢的桌面程序.使用wxPython来做界面非常的简单,只是不能像C#一样拖动控件,需要自行写代码布局.在完成编写之后,由于直接的p ...

  9. PyQt4 py2exe 打包 HardwareManager

    #!/usr/bin/env python # -*- coding: UTF-8 -*- # 1. 以下代码保存在HardwareManager项目的目录下,名称叫:setup.py: # 2. 打 ...

随机推荐

  1. [sql] view plain copy

    [sql] view plain copy CREATE TABLE SYS_USER ( USER_CODE VARCHAR( 36 ) NOT NULL, LOGIN_NAME VARCHAR( ...

  2. asddf

    https://docs.saltstack.com/en/getstarted/fundamentals/index.html https://pypi.org/simple/cherrypy/ 安 ...

  3. crawlspider的源码学习

    Spider基本上能做很多事情了,但是如果你想爬取全站的话,可能需要一个更强大的武器.CrawlSpider基于Spider,但是可以说是为全站爬取而生.CrawlSpiders是Spider的派生类 ...

  4. P2066 机器分配 (DP+DP输出)

    题目描述 总公司拥有高效设备M台,准备分给下属的N个分公司.各分公司若获得这些设备,可以为国家提供一定的盈利.问:如何分配这M台设备才能使国家得到的盈利最大?求出最大盈利值.其中M≤15,N≤10.分 ...

  5. eclipse导入maven项目有时出现web.xml is missing的问题

    今天导入一个从Git上pull下来的项目导入eclipse时,报错web.xml is missing,但是我检查了webapp下面的WEB-INF目录下是有web.xml的,然后就纠结了.纠结了半天 ...

  6. WebSocket Client连接AspNetCore SignalR Json Hub

    突然有个需求,需要使用普通的websocket客户端去连接SignalR服务器. 因为使用的是.net core 版的signalr,目前对于使用非signalr客户端连接的中文文档几乎为0,在gay ...

  7. D. Beautiful numbers

    题目链接:http://codeforces.com/problemset/problem/55/D D. Beautiful numbers time limit per test 4 second ...

  8. IDEA右键新建时没有Java Class选项

    今天在IDEA中新建了一个maven工程,但是在我想要新建Class时发件右键菜单里竟然没有Java Class选项!如下图所示: 如上图红圈所示,我们可以根据对项目的任意目录进行这五种目录类型标注, ...

  9. Spring AOP——Spring 中面向切面编程

    前面两篇文章记录了 Spring IOC 的相关知识,本文记录 Spring 中的另一特性 AOP 相关知识. 部分参考资料: <Spring实战(第4版)> <轻量级 JavaEE ...

  10. notepad++上配置ruby执行环境

    1.安装NppExec 插件 2.按快捷键F6,在弹出框中输入如下命令: npp_save  cd "$(CURRENT_DIRECTORY)"  jruby "$(FI ...