wenclick 发表于 2020-3-8 00:17

pyinstaller为什么打包不成功

本帖最后由 wenclick 于 2020-3-8 17:23 编辑

(venv1) F:\excel信息填入word模版>pyinstaller -F main.py
Traceback (most recent call last):
File "D:\Python36-32\Scripts\pyinstaller-script.py", line 6, in <module>
    from pkg_resources import load_entry_point
File "D:\Python36-32\lib\site-packages\pkg_resources\__init__.py", line 3088, in <module>
    @_call_aside
File "D:\Python36-32\lib\site-packages\pkg_resources\__init__.py", line 3072, in _call_aside
    f(*args, **kwargs)
File "D:\Python36-32\lib\site-packages\pkg_resources\__init__.py", line 3101, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
File "D:\Python36-32\lib\site-packages\pkg_resources\__init__.py", line 574, in _build_master
    ws.require(__requires__)
File "D:\Python36-32\lib\site-packages\pkg_resources\__init__.py", line 892, in require
    needed = self.resolve(parse_requirements(requirements))
File "D:\Python36-32\lib\site-packages\pkg_resources\__init__.py", line 778, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pefile>=2017.8.1' distribution was not found and is required by PyInstaller


用的是pycharm直接安装的pyinstaller,打包不了。后来手动安装试试,好像安装不了,就用回pycharm直接安装的pyinstaller了

影子无爱 发表于 2020-3-8 08:36

是不是这个库不存在load_entry_point

wenclick 发表于 2020-3-8 10:23

本帖最后由 wenclick 于 2020-3-8 11:27 编辑

影子无爱 发表于 2020-3-8 08:36
是不是这个库不存在load_entry_point
给了灵感,正在解决了,谢谢

ymhld 发表于 2020-3-8 15:54

一般是缺少库的关系,要不一般都可以按提示打包成功的
页: [1]
查看完整版本: pyinstaller为什么打包不成功