【发布时间】:2019-04-20 04:47:48
【问题描述】:
我正在尝试使用这个 github 项目中的代码:https://github.com/Katharsis/unfrozen_binary
当我尝试运行脚本时:python unfrozen_binary_cx_Freeze.py
我收到以下错误:
File "/path/to/file/unfrozen_binary-master/common.py", line 20, in <module>
from decompilers.uncompyle2 import uncompyle_file
ImportError: No module named decompilers.uncompyle2
我检查了 common.py,它导入了 uncompyle 包,如下所示:
if python_version[0] == 3:
from decompilers.unpyc3.unpyc3 import dec_module
elif python_version[0] in (1, 2):
from decompilers.uncompyle2 import uncompyle_file
from decompilers.uncompyle2 import Walker
没有可用的反编译器包。
但是,我已经安装了 uncompyle2,所以我编辑了上面的代码以仅使用 uncompyle2,因为我使用的是 Python 2.7 版
现在,即使我同时安装了 uncompyle2 和 uncompyle6,我也会收到 uncompyle2 的 ImportError。甚至用 pip show 命令证实了这一点。
>>> import uncompyle2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named uncompyle2
>>> import uncompyle6
>>>
但是,pip show 命令显示 uncompyle2 已安装:
$ pip show uncompyle2
Name: uncompyle2
Version: 2.0.0
Summary: Python byte-code to source-code converter
Home-page: https://github.com/rocky/python-uncompyle6
Author: Hartmut Goebel
Author-email: h.goebel@crazy-compilers.com
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires: uncompyle6
有没有人可以让上面的 github 项目工作?
请告诉我。
谢谢。
【问题讨论】:
-
请记住,它说的是
decompilers.uncompyle2,而不仅仅是uncompyle2。你试过pip install decompilers吗? -
没有这样的包称为反编译器。至少,我找不到一个。你能找到吗?甚至有人为此在 github 中记录了一个问题:github.com/Katharsis/unfrozen_binary/issues/1 但是没有任何响应。
标签: python decompiler