我尝试在OS X上安装angr时出错

时间:2017-12-02 23:49:47

标签: python macos

当我尝试安装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

1 个答案:

答案 0 :(得分:0)

您似乎正在使用Python 3. angr取决于程序包dpkt-fix,它在安装时尝试导入自身,但在Python 3中失败,因为dpkt-fix&#39; s代码使用import ah(et alii)来表示import .ah,它仅适用于Python 2。

解决方案:改用Python 2.