WARNING: Can not get binary dependencies for file...
环境:
window7 64bit
python 3.5
pyinstaller 3.2
用pyinstaller 将python文件打包成exe文件的过程中,出现了如下的错误
C:\Users\caoxin\PyInstaller-3.2>python pyinstaller.py --console --onefile main5.
py
249 INFO: PyInstaller: 3.2
249 INFO: Python: 3.5.0
250 INFO: Platform: Windows-7-6.1.7601-SP1
252 INFO: wrote C:\Users\caoxin\PyInstaller-3.2\main5\main5.spec
253 INFO: UPX is not available.
256 INFO: Extending PYTHONPATH with paths
['C:\\Users\\caoxin\\PyInstaller-3.2',
'C:\\Users\\caoxin\\PyInstaller-3.2\\main5']
256 INFO: checking Analysis
256 INFO: Building Analysis because out00-Analysis.toc is non existent
258 INFO: Initializing module dependency graph...
259 INFO: Initializing module graph hooks...
262 INFO: Analyzing base_library.zip ...
2670 INFO: running Analysis out00-Analysis.toc
2746 WARNING: Can not get binary dependencies for file: C:\Windows\system32\api-
ms-win-crt-runtime-l1-1-0.dll
Traceback (most recent call last):
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 6
95, in getImports
return _getImports_pe(pth)
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 1
22, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
2815 WARNING: Can not get binary dependencies for file: C:\Windows\system32\api-
ms-win-crt-stdio-l1-1-0.dll
Traceback (most recent call last):
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 6
95, in getImports
return _getImports_pe(pth)
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 1
22, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
2819 WARNING: Can not get binary dependencies for file: C:\Windows\system32\api-
ms-win-crt-heap-l1-1-0.dll
Traceback (most recent call last):
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 6
95, in getImports
return _getImports_pe(pth)
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 1
22, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
2829 WARNING: Can not get binary dependencies for file: C:\Windows\system32\api-
ms-win-crt-locale-l1-1-0.dll
Traceback (most recent call last):
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 6
95, in getImports
return _getImports_pe(pth)
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 1
22, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
2864 WARNING: Can not get binary dependencies for file: C:\Windows\system32\api-
ms-win-crt-math-l1-1-0.dll
Traceback (most recent call last):
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 6
95, in getImports
return _getImports_pe(pth)
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 1
22, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
3276 WARNING: Can not get binary dependencies for file: C:\Windows\system32\api-
ms-win-crt-string-l1-1-0.dll
Traceback (most recent call last):
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 6
95, in getImports
return _getImports_pe(pth)
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 1
22, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
3292 WARNING: Can not get binary dependencies for file: C:\Windows\system32\api-
ms-win-crt-convert-l1-1-0.dll
Traceback (most recent call last):
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 6
95, in getImports
return _getImports_pe(pth)
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 1
22, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
3298 WARNING: Can not get binary dependencies for file: C:\Windows\system32\api-
ms-win-crt-conio-l1-1-0.dll
Traceback (most recent call last):
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 6
95, in getImports
return _getImports_pe(pth)
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 1
22, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
3305 WARNING: Can not get binary dependencies for file: C:\Windows\system32\api-
ms-win-crt-process-l1-1-0.dll
Traceback (most recent call last):
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 6
95, in getImports
return _getImports_pe(pth)
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 1
22, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
3315 WARNING: Can not get binary dependencies for file: C:\Windows\system32\api-
ms-win-crt-time-l1-1-0.dll
Traceback (most recent call last):
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 6
95, in getImports
return _getImports_pe(pth)
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 1
22, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
3319 WARNING: Can not get binary dependencies for file: C:\Windows\system32\api-
ms-win-crt-environment-l1-1-0.dll
Traceback (most recent call last):
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 6
95, in getImports
return _getImports_pe(pth)
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 1
22, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
3331 WARNING: Can not get binary dependencies for file: C:\Windows\system32\api-
ms-win-crt-filesystem-l1-1-0.dll
Traceback (most recent call last):
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 6
95, in getImports
return _getImports_pe(pth)
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 1
22, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
3332 INFO: Caching module hooks...
3337 INFO: Analyzing C:\Users\caoxin\PyInstaller-3.2\main5.py
3374 INFO: Loading module hooks...
3375 INFO: Loading module hook "hook-encodings.py"...
3384 INFO: Loading module hook "hook-pydoc.py"...
3384 INFO: Loading module hook "hook-xml.py"...
3602 INFO: Looking for ctypes DLLs
3602 INFO: Analyzing run-time hooks ...
3612 INFO: Looking for dynamic libraries
4173 WARNING: Can not get binary dependencies for file: C:\Windows\system32\api-
ms-win-crt-utility-l1-1-0.dll
Traceback (most recent call last):
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 6
95, in getImports
return _getImports_pe(pth)
File "C:\Users\caoxin\PyInstaller-3.2\PyInstaller\depend\bindepend.py", line 1
22, in _getImports_pe
dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
4332 INFO: Looking for eggs
4332 INFO: Using Python library C:\Users\caoxin\AppData\Local\Programs\Python\Py
thon35\python35.dll
4334 INFO: Found binding redirects:
[]
4342 INFO: Warnings written to C:\Users\caoxin\PyInstaller-3.2\main5\build\main5
\warnmain5.txt
4355 INFO: checking PYZ
4355 INFO: Building PYZ because out00-PYZ.toc is non existent
4357 INFO: Building PYZ (ZlibArchive) C:\Users\caoxin\PyInstaller-3.2\main5\buil
d\main5\out00-PYZ.pyz
4900 INFO: checking PKG
4901 INFO: Building PKG because out00-PKG.toc is non existent
4901 INFO: Building PKG (CArchive) out00-PKG.pkg
6788 INFO: Bootloader C:\Users\caoxin\PyInstaller-3.2\PyInstaller\bootloader\Win
dows-64bit\run.exe
6789 INFO: checking EXE
6789 INFO: Building EXE because out00-EXE.toc is non existent
6789 INFO: Building EXE from out00-EXE.toc
6789 INFO: Appending archive to EXE C:\Users\caoxin\PyInstaller-3.2\main5\dist\m
ain5.exe
通过google,找到最终的解决方案,原因是pyinstaller 3.2有bug,目前开发版本的pyinstaller解决了此bug,所以用pyinstaller-develop版本就可以将此问题解决。
即直接执行:
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip
然后解压该安装包,进入解压的文件夹内执行
python pyinstaller.py --console --onefile main5.py
问题得到修复。
另外值得注意的一点,在Win7 64位的操作系统中,也要装python3.5 32位的安装包。具体原因如下:
参考网址:
WARNING: Can not get binary dependencies for file
Why isn't pyinstaller making me an .exe file?
WARNING: Can not get binary dependencies for file...的更多相关文章
- mac 连接mysql提示 Warning: mysqli::real_connect(): (HY000/2002): No such file or directory
mac 连接mysql的时候提示 Warning: mysqli::real_connect(): (HY000/2002): No such file or directory [说明1]MAC下M ...
- The difference between text mode and binary mode with file streams
FIO14-C. Understand the difference between text mode and binary mode with file streams Skip to e ...
- Canal 同步异常分析:Could not find first log file name in binary log index file
文章首发于[博客园-陈树义],点击跳转到原文Canal同步异常分析:Could not find first log file name in binary log index file. 公司搜索相 ...
- Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'系列一:
从库报这个错误:Got fatal error 1236 from master when reading data from binary log: 'Could not find first lo ...
- nodejs -- fs模块 ---> readFile 函数 1) fs.readFile(filename, "binary", function(error, file) 2) response.write(file, "binary");
一:代码: 1.1 入口文件: index.js var server = require('./server'); var router = require("./router" ...
- mysql从库Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'报错处理
年后回来查看mysql运行状况与备份情况,登录mysql从库查看主从同步状态 mysql> show slave status\G; *************************** . ...
- 'Could not find first log file name in binary log index file'的解决办法
数据库主从出错: Slave_IO_Running: No 一方面原因是因为网络通信的问题也有可能是日志读取错误的问题.以下是日志出错问题的解决方案: Last_IO_Error: Got fatal ...
- Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'
setup slave from backup i got error Got fatal error 1236 from master when reading data from binary l ...
- warning no newline at the end of file
main.c :10:2 warning: no newline at the end of file 修复这个警告,在文件结尾回车一下就行了.可以很少会有人去仔细探究,为什么gcc会给出这么一个警告 ...
随机推荐
- BeagleBone Black的内核移植-从零开始制作镜像
很多年前做的针对BeagleBone Black开发板的镜像制作,因为当时涉及到非标准化的,所以把基本的kernel.uboot和跟文件系统rootfs都做了一遍,文中只做移植,不作定制化的修改. 如 ...
- i春秋 “百度杯”CTF比赛 十月场 web题 Backdoor
0x00: 打开题目,题目中告诉我们这题是文件泄露. 0x01: 通过扫描目录,发现可以扫到的有3个文件 index.php flag.php robots.txt 但是浏览flag.php它告诉我们 ...
- 操作系统概述(os 笔记一)
操作系统概述 操作系统的目标和功能 1.目标:作为用户/计算机接口 计算机的使用人群大致可以分为三类,终端用户,程序开发者,操作系统设计人员. 对于终端用户,即应用程序的用户来说,他们通常不关注计 ...
- sass那些事儿
Sass,Syntactically Awesome StyleSheets,语法样式表.Sass有两种实现,ruby-sass与lib-sass,前者用ruby实现,后者用C/C++实现. 一.Sa ...
- 观察者模式之ES6实现(二)
一.问题描述实现一个EventEmitter类,这个类包含以下方法:on(监听事件,该事件可以被触发多次)once(也是监听事件,但只能被触发一次)fire(触发指定的事件)off(移除指定事件的某个 ...
- 线程安全地获取插入mysql的条目的id
在往mysql中插入条目时有时会希望能得到该插入条目的id,一种方式是再执行一个select语句条件为max(id)来获取,但这种形式在并发环境里并不是线程安全的,因为在你完成插入到再执行一个sele ...
- 洛谷P3373 [模板]线段树 2(区间增减.乘 区间求和)
To 洛谷.3373 [模板]线段树2 题目描述 如题,已知一个数列,你需要进行下面两种操作: 1.将某区间每一个数加上x 2.将某区间每一个数乘上x 3.求出某区间每一个数的和 输入输出格式 输入格 ...
- 潭州课堂25班:Ph201805201 爬虫基础 第十二课 点触验证码二 (课堂笔记)
为上次代码添加 模拟人操作 的鼠标的移动轨迹 # -*- coding:utf-8 -*- # 斌彬电脑 # @Time : 2018/9/14 0014 上午 8:08 from selenium ...
- js常用事件
为了便于使读者更好地运用js事件,就把常用事件大致分为以下几种: a. 表单元素事件,在表单元素中生效 onfocus ------获取焦点 onblur -------失去焦点 onsubmit ...
- cas 资源
http://blog.sina.com.cn/s/blog_6fda308501012tk2.html http://www.blogjava.net/xmatthew/archive/2008/0 ...