pyinstaller如何打包含有dll的.py文件?

命令:pyinstaller test.spec
执行:test.exe
出错:E:\python\project\lbmWebS\lib\testapi.dll could not be extracted!

打包的warn文件
missing module named unicodedata.ucd_3_2_0 - imported by unicodedata, stringprep, encodings.idna
missing module named warnings.warn_explicit - imported by _warnings, warnings
missing module named _warnings.filters - imported by _warnings, warnings
missing module named _warnings.once_registry - imported by _warnings, warnings
missing module named _warnings.default_action - imported by _warnings, warnings
missing module named _warnings.warn - imported by _warnings, warnings
missing module named _subprocess.STD_OUTPUT_HANDLE - imported by _subprocess, subprocess
missing module named _subprocess.CREATE_NEW_PROCESS_GROUP - imported by _subprocess, subprocess
missing module named _subprocess.STD_INPUT_HANDLE - imported by _subprocess, subprocess
missing module named _subprocess.STARTF_USESHOWWINDOW - imported by _subprocess, subprocess
missing module named _subprocess.CREATE_NEW_CONSOLE - imported by _subprocess, subprocess
missing module named _subprocess.STD_ERROR_HANDLE - imported by _subprocess, subprocess
missing module named _subprocess.STARTF_USESTDHANDLES - imported by _subprocess, subprocess
missing module named _subprocess.SW_HIDE - imported by _subprocess, subprocess
missing module named cPickle.loads - imported by cPickle, collections
missing module named cPickle.dumps - imported by cPickle, collections
missing module named thread.get_ident - imported by thread, collections
missing module named thread._local - imported by thread, threading
missing module named thread.stack_size - imported by thread, threading
missing module named thread.allocate_lock - imported by thread, _strptime
missing module named itertools.chain - imported by itertools, heapq, collections
missing module named itertools.starmap - imported by itertools, collections
missing module named itertools.repeat - imported by itertools, heapq, collections
missing module named itertools.imap - imported by itertools, heapq
missing module named itertools.tee - imported by itertools, heapq
missing module named itertools.izip - imported by itertools, heapq
missing module named itertools.count - imported by itertools, heapq
missing module named itertools.islice - imported by itertools, repr, heapq
missing module named operator.itemgetter - imported by operator, collections, heapq
missing module named operator.attrgetter - imported by operator, inspect
missing module named _collections.deque - imported by _collections, collections
missing module named _collections.defaultdict - imported by _collections, collections
missing module named _weakref.ref - imported by _weakref, _weakrefset, weakref
missing module named _weakref.ReferenceType - imported by _weakref, weakref
missing module named _weakref.proxy - imported by _weakref, weakref
missing module named _weakref.getweakrefs - imported by _weakref, weakref
missing module named _weakref.getweakrefcount - imported by _weakref, weakref
missing module named _weakref.ProxyType - imported by _weakref, weakref
missing module named _weakref.CallableProxyType - imported by _weakref, weakref
missing module named time.time - imported by time, threading
missing module named time.sleep - imported by time, threading
missing module named datetime.date - imported by datetime, _strptime
missing module named errno.ENOENT - imported by errno, gettext
missing module named _functools.partial - imported by _functools, functools
missing module named _functools.reduce - imported by _functools, functools
missing module named copy.deepcopy - imported by copy, weakref
missing module named exceptions.ReferenceError - imported by exceptions, weakref
missing module named binascii.hexlify - imported by binascii, random
missing module named math.sin - imported by math, random
missing module named math.sqrt - imported by math, random
missing module named math.cos - imported by math, random
missing module named math.acos - imported by math, random
missing module named math.ceil - imported by math, random
missing module named math.exp - imported by math, random
missing module named math.log - imported by math, random
missing module named math.e - imported by math, random
missing module named math.pi - imported by math, random
missing module named readline - imported by cmd, pdb
missing module named errno.EINVAL - imported by errno, StringIO
missing module named cStringIO.StringIO - imported by cStringIO, gettext, pickle, pprint, shlex, tempfile, encodings.uu_codec, quopri, encodings.quopri_codec
missing module named binascii.b2a_qp - imported by binascii, quopri
missing module named binascii.a2b_qp - imported by binascii, quopri
missing module named binascii.a2b_uu - imported by binascii, encodings.uu_codec
missing module named binascii.b2a_uu - imported by binascii, encodings.uu_codec
missing module named 'org.python'.PyStringMap - imported by 'org.python', pickle
missing module named 'org.python' - imported by pickle
missing module named struct.calcsize - imported by struct, ctypes
missing module named _struct.
_doc__ - imported by struct, struct
missing module named _struct._clearcache - imported by _struct, struct
missing module named fcntl - imported by subprocess, tempfile
missing module named threading.RLock - imported by threading, _threading_local
missing module named threading.current_thread - imported by threading, _threading_local
missing module named os.urandom - imported by os, random
missing module named riscosenviron._Environ - imported by riscosenviron, os
missing module named riscosenviron - imported by os
missing module named riscospath - imported by os
missing module named riscos._exit - imported by riscos, os
missing module named riscos - imported by os
missing module named ce._exit - imported by ce, os
missing module named ce - imported by os
missing module named _emx_link.link - imported by _emx_link, os
missing module named _emx_link - imported by os
missing module named os2._exit - imported by os2, os
missing module named os2 - imported by os
missing module named nt._isdir - imported by nt, ntpath
missing module named nt._getfullpathname - imported by nt, ntpath
missing module named nt._exit - imported by nt, os
missing module named pwd - imported by posixpath
missing module named posix._exit - imported by posix, os
missing module named posix - imported by os
missing module named resource - imported by posix
missing module named strop.whitespace - imported by strop, string
missing module named strop.maketrans - imported by strop, string
missing module named strop.lowercase - imported by strop, string
missing module named strop.uppercase - imported by strop, string
missing module named org.PyStringMap - imported by org, copy
missing module named org - imported by copy
missing module named re._compile - imported by re, sre
missing module named re.
_all__ - imported by re, sre
missing module named codecs.mbcs_encode - imported by codecs, encodings.mbcs
missing module named codecs.mbcs_decode - imported by codecs, encodings.mbcs
missing module named ctypes._wstring_at_addr - imported by _ctypes, ctypes
missing module named _ctypes._string_at_addr - imported by _ctypes, ctypes
missing module named _ctypes._cast_addr - imported by _ctypes, ctypes
missing module named _ctypes._memset_addr - imported by _ctypes, ctypes
missing module named _ctypes._memmove_addr - imported by _ctypes, ctypes
missing module named _ctypes.get_last_error - imported by _ctypes, ctypes
missing module named _ctypes.set_last_error - imported by _ctypes, ctypes
missing module named _ctypes._check_HRESULT - imported by _ctypes, ctypes
missing module named _ctypes.set_conversion_mode - imported by _ctypes, ctypes
missing module named _ctypes._pointer_type_cache - imported by _ctypes, ctypes
missing module named _ctypes.POINTER - imported by _ctypes, ctypes
missing module named _ctypes._SimpleCData - imported by _ctypes, ctypes
missing module named _ctypes.get_errno - imported by _ctypes, ctypes
missing module named _ctypes.set_errno - imported by _ctypes, ctypes
missing module named _ctypes.alignment - imported by _ctypes, ctypes
missing module named _ctypes.addressof - imported by _ctypes, ctypes
missing module named _ctypes.resize - imported by _ctypes, ctypes
missing module named _ctypes.byref - imported by _ctypes, ctypes
missing module named _ctypes.sizeof - imported by _ctypes, ctypes
missing module named _ctypes.dlopen - imported by _ctypes, ctypes
missing module named _ctypes.FUNCFLAG_STDCALL - imported by _ctypes, ctypes
missing module named _ctypes.LoadLibrary - imported by _ctypes, ctypes
missing module named _ctypes.FUNCFLAG_USE_ERRNO - imported by _ctypes, ctypes
missing module named _ctypes.FUNCFLAG_USE_LASTERROR - imported by _ctypes, ctypes
missing module named _ctypes.FUNCFLAG_PYTHONAPI - imported by _ctypes, ctypes
missing module named _ctypes.FUNCFLAG_CDECL - imported by _ctypes, ctypes
missing module named _ctypes.FormatError - imported by _ctypes, ctypes
missing module named _ctypes.ArgumentError - imported by _ctypes, ctypes
missing module named _ctypes.RTLD_LOCAL - imported by _ctypes, ctypes
missing module named _ctypes.RTLD_GLOBAL - imported by _ctypes, ctypes
missing module named _ctypes.
_version__ - imported by _ctypes, ctypes
missing module named _ctypes.CFuncPtr - imported by _ctypes, ctypes
missing module named _ctypes._Pointer - imported by _ctypes, ctypes
missing module named _ctypes.Structure - imported by _ctypes, ctypes
missing module named _ctypes.Array - imported by _ctypes, ctypes
missing module named _ctypes.Union - imported by _ctypes, ctypes

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
使用pyInstaller打包py文件
1.安装(python3.5环境) pip install pyinstaller  可以参考官网:http://www.pyinstaller.org/ 2.打包 pyinstall -F myfile.py 在输出提示信息里可以看到打包后的exe文件路径 3.如果报错,百度好了,一般就是缺一些import
pyinstaller 安装及打包py文件,
----------------踩了几次坑,搜烂了Stack Overflow,谷歌之后终于打包成功该教程应该是网上最详细的了,----------------一.pyinstaller 安装使用命令:pip install pyinstaller就可以安装新版pyinstaller(本人是下载的3.3.1)二.使用1.先创建spec文件  在命令行进入你的py文件所在目录然后输入pyi-make...
Pyinstaller打包.py文件心路历程
最近在用PyQt写一个界面程序,需要把.py文件打包成.exe文件,这样在没有Python环境的电脑上也能正常使用,很方便。网上99%的人都建议用pyinstaller进行打包,这里面也遇到了很多问题,先记录一下。1.首先是环境:操作系统:64位win10,python版本:3.6.4,PyQt版本:5.6.2(以上均为anaconda5.1.0自带),程序中使用了Python机器学习与科学计算第...
Pyinstaller打包多个.py文件
一、多文件打包为单一文件时,即pyinstaller 命令中加入了-F,也可能会导致错误。尽量不要使用-F。二、尽量把打包后的文件放在英文目录下。多个.py文件打包命令格式如下:pyinstaller [主文件] -p [其他文件1] -p [其他文件2] --hidden-import [自建模块1] --hidden-import [自建模块2]三、使用pyinstaller打包的时候,仅打包...
pyinstaller打包.py文件为.exe可执行文件
安装pyinstaller pip install pyinstaller 使用 pyinstaller -F XXX.py -i icon.jpg -F是打包成单个exe,-i是设置exe图标。 执行后,看到同级目录下多出几个文件。等待一段时间后。。 最终失败。。=,=’ ...
用pyinstaller打包.py成EXE文件
一、python安装pyinstaller方法 使用python编写脚本,需要发给别人使用的时候,总会想到如何打包成exe文件,发给对方。这样的话,对方可以直接使用运行,无需安装python。所以看网上的教程,大多使用pyinstaller。以下介绍下安装方法: 1、在cmd控制台下,先升级pip版本,先执行命: pip install -U pip,若执行失败,控制台会提示新密令,按照提示...
pyinstaller打包py文件为exe方法
最近在github上找到了个基于opencv的连连看辅助程序。由于在学习PYTHON,就下载下来阅读了下。发现其实现需要安装多个第三方库,python解释器等,对于更换环境后执行非常麻烦,所以便想将其打包为一个可执行文件。贴上开源地址:https://github.com/TheThreeDog/Auto-Lianliankan百度了下py的打包工具,比较了下觉得pyinstaller打包较为简单...
pyinstaller打包py文件的一些问题记录
  打包了一个django网站,折腾了一天才弄好,这里记录下遇到的一些问题及相应的解决办法(pyinstaller的安装及使用方法可自行百度 ): 打包环境:      django==1.8      win7 64位       python==2.7.12       pyinstaller==3.3.1 项目结构(简化): pro templates views u...
使用pyinstaller把py文件打包为exe文件
使用pyinstaller把py文件打包为exe文件
使用pyinstaller打包py文件为exe文件
进入命令行cmd,进入到需要打包的py文件所在的文件夹目录: 可以使用pyinstaller XXX.py的命令打包: 在exe目录中会生成dist和build文件夹,build文件夹可以安全删除,dist文件夹中存在打包好的solve.exe和动态链接库 建议使用如下的打包命令,可以使得dist生成一个独立的exe文件,没有依赖库。 pyinstaller -F solv
pyinstaller 打包 把py文件打包成exe运行文件
打开cmd窗口 使用pip命令安装:pip install PyInstaller pip install pywin32 把路径切换到文件所在路径(文件随便放在哪里都行)打开命令提示行,输入以下内容(最后的是文件名): pyinstaller -F myfile.py 即打包在当前目录下 exe文件在dist目录中 ...
Python3 pyinstaller打包.py文件成生成exe文件
1。安装pyinstaller pip3 install pyinstaller 2.找到要打包的py文件目录,打开cmd,输入命令: pyinstaller -f 1.py # 注:如打包的exe运行后无需黑框,请输入pyinstaller -f 1.py --noconsole 3.exe文件在dist文件夹中 ...
pyinstaller将含有多个py文件的python程序做成exe
1.尽量将资源文件夹放到主文件夹下2.pyi-makespec main.py制作spec文件3.spec文件在当前文件夹下,main.spec编辑spec文件# -*- mode: python -*- block_cipher = None a = Analysis(['main.py', 'monitor.py',   'E:\\py_project\\test_wpf_pyth...
pyinstaller打包多个py脚本流程备忘
[b][size=medium][size=large][size=medium][size=x-small]最近写了一个爬取html中图片,然后将图片下载到本地的脚本。想着做成exe,就在网上各种找工具。后来找了一个py2exe,优点是可配置的选项很丰富,import py2exe模块后,修改打包脚本就可以。然后在网上找了很多py2exe的资料,安装、配置、打包等,都成功了。但是有个小问题是,打...
pyinstaller打包文件
安装 pip install pyinstaller 参数 参数 含 义 -F 只生成一个exe文件 –distpath 指定生成的exe存放的目录 –workpath 指定编译中临时文件存放的目录 -i 创建一个目录包含:exe文件、依赖文件 -F 指定exe图标 -p 指定exe依赖的包、模块 -d 编译为debug模式,获取运行中的日志信息 -cl...
pyinstaller 打包含有资源文件(dll)的方法,详细过程
一、安装pyinstaller pass 二、先上个栗子: 我的文件组成: callMain.py   discuz.py  scrpyIp.py  tools.py  ui_main.py yundama.py  yundamaAPI.dll 其中,callMain.py 是函数入口, yundama.py的运行需要加载yundamaAPI.dll,其余的.py文件都是供callMain...
Pyinstaller打包多个依赖py文件成exe
求助大神~rn之前在网上一直查打包多个py依赖文件的方法,这方面没查到多少而且都没有成功..请有经验的赐教!!!rn[img=https://img-bbs.csdn.net/upload/201609/09/1473394973_541587.png][/img]rn[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/6.gif][/img]
Python3之使用pyinstaller打包.py文件成exe可执行文件
安装pyinstaller pip3 install pyinstaller 找到要打包的py文件目录,打开cmd,输入命令: pyinstaller -F test.py #要带文件py后缀! 我们需要的exe文件在dist夹子中! 其它参数: 注意:图片必须是ico格式 pyinstaller -F –icon=dog.ico ts_combine.
用Pyinstaller打包*.py文件发布exe应用
前提需安装python和Pyinstaller,具体安装步骤请参考: https://jingyan.baidu.com/article/a378c960b47034b3282830bb.html 下面是完整发布命令发布独立exe应用步骤(需打包的文件名test.py): 1)在cmd命令行下将目录切换到Python安装盘下,如F:\Python\Script; 2)执行命令:pyinst...
使用 pyinstaller 打包 py 文件成 exe 程序
使用方法: 将cmd的目录切换至(命令:cd 文件路径(注意空格))需要打包的py文件目录下:cd D:\Projects\Python_projects\ 输入:pyinstaller -F 文件名(带后缀py):pyinstaller -F test.py注意如果有引用第三方库的话,这种方法打包的exe会提示缺少模块,这时候需要把所有...
Python3.6应用Pyinstaller打包py文件的一些注意事项
打开cmd进入要打包的py文件目录,使用命令Pyinstaller -F -w -p -i myfile.py -F 表示生成单个可执行文件 -w 表示去掉控制台窗口,这在GUI界面时非常有用。不过如果是命令行程序的话那就把这个选项删除吧! -p 表示你自己自定义需要加载的类路径,一般情况下用不到 -i 表示可执行文件的图标 当py文件中含有第三方库时,打包之前要把用到的第三方库文件
pyinstaller 打包含有docx库的方法
简单说明 pyinstaller -F #将文件打包成一个exe文件 pyinstaller --hidden-import 模块名 #将使用的模块也打包到程序中 pyinstaller -i ico文件名 #指定打包的程序使用的图标 当要打包的py程序中包含有创建一个空白的docx文档时 使用常规的命令是会报错的,错误示范 pyinstaller -F 1.py -i 1.ico --hidde...
Python_打包py文件
【1】创建一个virtualenv环境:virtualenv也就是虚拟环境。可以在同一个计算机中隔离多个python版本,比如python2,python3; mkdir SandwichApp    cd SandwichApp # Use virtualenv to create an isolated environment virtualenv 环境名 source venv/...
如何快速用pyinstaller打包python文件
作为一个python新手小白,在完成了自己的第一个python程序后,面临的一个难题就是如何打包,并且能在没有安装python编译器的电脑上面运行,于是各种百度。。。终于,终于在耐心快要耗完之际完成了,233,以下就是我安装的步骤,若有不对的地方,请指正,谢谢。 安装pyinstaller 直接打开cmd,然后输入pip install pyinstaller即可安装。(这种方法...
PyInstaller打包
支持python2.7---3.5版本打包,压缩包还包含手册说明书
Python | Pyinstaller打包之依赖文件
搞了半天终于安装好了pyinstaller吗,打开打包好的exe文件,一闪而过,纳尼,痛心疾首,于是又是一阵搜,发现原来是依赖文件没有拷到.exe文件目录下,我的依赖文件是同一目录下的.txt文件,我把这个文件拷到.exe文件目录下之后就可以用了。鼓掌庆祝https://jingyan.baidu.com/album/b2c186c8d9856dc46ff6ff54.html?picindex=4...
pyinstaller库将.py打包为.exe的说明
环境: pyinstaller 3.3.1 python 3.6.4   1.Windows下cmd,Linux下ctrl+alt+T打开终端 输入命令 pip install pyinstaller   2.转载博客,修改参数 pyinstaller打包错误 UnicodeDecodeError: 'gbk' codec can't decode byte 0xab in pos...
Pyinstaller 打包.py生成.exe的方法和报错总结
Pyinstaller 打包.py生成.exe的方法和报错总结 简介 有时候自己写了个python脚本觉得挺好用想要分享给小伙伴,但是每次都要帮他们的电脑装个python环境。虽然说装一下也快,但是相对来说效率还是不高,要是能将python的**.py文件转化为.exe**,那么世界将变得更美好。这篇文章我将简单的介绍如何使用Pyinstaller来打包我们的python脚本。 安装 Pyin...
怎样将py文件生成exe文件——在Anaconda3下安装使用pyinstaller
Python生成可执行文件主要有三种方法,利用py2exe,pyInstaller或cx_Freeze。这里选择pyinstaller。Python环境配置不同,安装pyinstaller的方法和生成exe文件的操作方法也不同。 这里给出Anaconda环境下,pyinstaller的安装和使用的方法,不需要专门到网站下载,在Anaconda Prompt里输入两条指令即可,比较简单。   (...
pyinstaller打包exe---打包实践
在命令行窗口中 使用 pyinstaller [options]   xx.py可以将python打包为单个exe程序。有时遇到再IDE中测试运行没有问题的python程序,打包成exe后,就无法运行,提示无法运行脚本。建议打包时先用   pyinstaller -F  xx.py这种简单形式打包。再将打包好的exe用鼠标拖动到cmd窗口中,回车进行运行。如果有错误,cmd窗口中会显示具体错误信息
py文件打包为exe文件
1、python自带pyinstaller包,直接pip就可以       到要打包的py文件目录下,执行   pyinstaller xx.py       相应目录下就会出现dist文件夹,直到找到xx.exe运行起来即可。        看一下pyinstaller 不同形式的打包:             执行pyinstaller -F xx.py,再看一下dist文件夹下...
Python3.6打包 py 文件为 exe 文件
pyinstaller安装与使用 很多时候都需要将python源文件打包成exe可执行程序,这时候pyinsaller就派上用场了。 直接用pip安装: >pip install pyinstaller 网上很多教程说pyinstaller不支持python3.6,要去GitHub上下载,还有需要pywin32之类的,但实际pyinstaller已经更新可支持python3.6了,并且安装...
用PyInstaller将.py文件打包成.exe文件
上一篇文章中已经把PyInstaller安装好了,下面就来看看怎么用它把写的python程序打包成直接执行的.exe文件。 先写一个简单的判断质数的程序,保存为isprime.py。先用命令提示符运行这个程序。把这个文件复制到PyInstaller文件夹目录下。在命令提示符中打开这个文件夹目录,cd:PyInstaller文件夹目录 python isprime.py 执行python代码,结果如
pyinstaller把.py文件打包成exe文件
window系统下,打开cmd 输入以下指令实现打包: pyinstaller -F xxx.py --noconsole 注意:xxx.py中的xxx指的是文件名,--noconsole 的作用是去掉打开exe文件时出现的黑框框 实例: g.py文件的路径是C:\Users\Administrator\Desktop,把g.py直接拖曳进cmd时会产生路径信息,不用理会它,这样也...
pyinstaller库的安装及打包
pyinstaller库的安装及打包 相信各位在学习python或用python的时候都会接触到pyinstaller库,pyinstaller可以将.py源代码打包成.exe应用程序,这样对方接受到这个.exe文件不用安装python也能运行了,而且还能防止源代码泄露哦! 好了说了一大堆屁话,现在就讲讲怎么安装pyinstaller以及怎么实现打包的。博主也是一头雾水的看了各种帖...
pyinstaller打包注意事项
一,安装 pip3 install pyinstaller 二,打包成一个可执行文件 pyinstaller -F file.py 三,如果代码里面使用了pony orm的话需要在代码里面添加如下代码 import pony.orm.dbproviders import pony.orm.dbproviders.mysql    ...
pyinstaller 打包exe 问题解决
Traceback (most recent call last): File "C:\Users\qiyong.GWMFC\venv\Scripts\pyinstaller-script.py", line 11, in <module> load_entry_point('PyInstaller==3.4', 'console_scripts', 'pyinstalle...
利用pyinstaller打包python代码
pyinstaller code.py -F -F 用于打包成一个独立的文件。
pyinstaller打包python脚本和资源
1.安装pyinstallerpip install pyinstaller2.无图标资源打包:pyinstaller -F pyPath/name.py就可以看到生成了build和dist文件夹,dist文件夹中有你打包的exe,是单个文件(不带-F就是一群散文件)有图标资源打包1:pyi-makespec pyPath/name.py它会生成name.spec,这时打开spec文件可以看到下面代
pyinstaller打包 .ipynb文件时出现 闪退
解决方法: 将.ipynb文件下载为py文件后,使用pyinstaller打包.py文件
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池