py2app TypeError:dyld_find()得到了意外的关键字参数'loader' [英] py2app TypeError: dyld_find() got an unexpected keyword argument 'loader'

查看:110
本文介绍了py2app TypeError:dyld_find()得到了意外的关键字参数'loader'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用py2app构建应用程序时遇到困难.我可以使用以下命令在别名模式下构建它:

I'm having difficulty building my app using py2app. I can build it in alias mode without issue using this command:

python3.4 setup.py py2app -A

但是,当我尝试使用以下内容进行构建时:

However when I try and build it using:

python3.4 setup.py py2app

我按照这篇文章的标题得到错误消息.根据我所做的研究,我认为这是Pillow的问题.但是我需要这个应用程序的枕头. (除非有另一个我可以用来导入图像的模块?).我也尝试过cx_freeze失败.

I get the error message as per title of this post. From the research I've done I believe it's an issue with Pillow; however I need Pillow for this app. (Unless there's another module I can use to import images??). I've also tried cx_freeze without success.

任何帮助或指导,不胜感激.

Any help or direction much appreciated.

完整回溯如下:

Traceback (most recent call last):
File "setup.py", line 19, in <module>
setup_requires=['py2app'],
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/
distutils/core.py", line 148, in setup dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/
distutils/dist.py", line 955, in run_commands self.run_command(cmd)
File"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/
distutils/dist.py", line 974, in run_command cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/
site-  packages/py2app/build_app.py", line 659, in run self._run()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/
site- packages/py2app/build_app.py", line 865, in _run self.run_normal()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/
site- packages/py2app/build_app.py", line 959, in 
run_normal self.create_binaries(py_files, pkgdirs, extensions,loader_files)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/
site- packages/py2app/build_app.py", line 1214, in create_binaries
platfiles = mm.run()
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/
site-packages/macholib/MachOStandalone.py", line 105, in run
mm.run_file(fn)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/
site-packages/macholib/MachOGraph.py", line 84, in run_file
self.scan_node(m)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/
site-packages/macholib/MachOGraph.py", line 110, in scan_node 
m =  self.load_file(filename, caller=node)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/
site-packages/macholib/MachOGraph.py", line 93, in load_file
newname = self.locate(name, loader=caller)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/
site-packages/macholib/MachOStandalone.py", line 23, in locate
newname = super(FilteredMachOGraph, self).locate(filename, loader)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/
site-packages/macholib/MachOGraph.py", line 49, in locate
loader=loader.filename)
TypeError: dyld_find() got an unexpected keyword argument 'loader'

推荐答案

这是一个临时解决方案,可能会破坏其他功能.我建议这样做是在虚拟环境中,这样您就不会弄乱常规软件包.这对我有用(virtenv是我的虚拟环境的名称)

This is a temporary solution, and it may break other things. I would recommend doing this is a virtual environment so you don't mess up your regular packages. This worked for me (virtenv is the name of my virtual environment)

打开文件/virtenv/lib/python3.4/site-packages/macholib/dyld.py,并将loader_path的每个实例替换为loader.现在保存并重试.

Open the file /virtenv/lib/python3.4/site-packages/macholib/dyld.py and replace each instance of loader_path with loader. Now save and try again.

这篇关于py2app TypeError:dyld_find()得到了意外的关键字参数'loader'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆