1

当我尝试安装时angr,出现此错误:

>> pip install angr


> Collecting angr
>       Using cached angr-7.7.9.21.tar.gz
>     Collecting ana (from angr)
>       Using cached ana-0.03.zip
>     Collecting bintrees (from angr)
>       Using cached bintrees-2.0.7.zip
>     Collecting cachetools (from angr)
>       Using cached cachetools-2.0.1-py2.py3-none-any.whl
>     Collecting capstone (from angr)
>       Using cached capstone-3.0.4.tar.gz
>     Collecting cooldict (from angr)
>       Using cached cooldict-1.02.tar.gz
>     Collecting dpkt-fix (from angr)
>       Using cached dpkt-fix-1.7.tar.gz
>     Complete output from command python setup.py egg_info:
>     Traceback (most recent call last):
>       File "<string>", line 1, in <module>
>       File "/private/var/folders/sw/ccryj7_95wn7wc94w2nn1plw0000gn/T/pip-build-njcedr48/dpkt-fix/setup.py",
> line 4, in <module>
>         import dpkt
>       File "/private/var/folders/sw/ccryj7_95wn7wc94w2nn1plw0000gn/T/pip-build-njcedr48/dpkt-fix/dpkt/__init__.py",
> line 13, in <module>
>         import ah
>     ImportError: No module named 'ah'
>     
>     ----------------------------------------
>     Command "python setup.py egg_info" failed with error code 1 in      /private/var/folders/sw/ccryj7_95wn7wc94w2nn1plw0000gn/T/pip-build-njcedr48/dpkt-fix/

你能帮忙解决这个问题吗?

OS X EI Captain 10.11.6
4

1 回答 1

0

您似乎正在使用 Python 3. angr取决于 package dpkt-fix,它在安装时尝试自行导入,这在 Python 3 中失败,因为dpkt-fix的代码使用import ah(et alii) 来表示import .ah,这仅在 Python 2 中有效。

解决方案:改用 Python 2。

于 2017-12-03T00:53:40.563 回答