mitmproxy安装错误

时间:2014-11-26 08:40:13

标签: proxy centos egg mitmproxy

我尝试使用python 2.6.6在centos 6.4上安装mitmproxy,我在执行install命令时遇到错误。

#pip install mitmproxy

Downloading/unpacking mitmproxy
  Running setup.py egg_info for package mitmproxy
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip-build-root/mitmproxy/setup.py", line 19
        "netlib>=%s, <%s" % (version.MINORVERSION, version.NEXT_MINORVERSION),
                                                                             ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/tmp/pip-build-root/mitmproxy/setup.py", line 19

    "netlib>=%s, <%s" % (version.MINORVERSION, version.NEXT_MINORVERSION),

                                                                         ^

SyntaxError: invalid syntax

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-root/mitmproxy
Storing complete log in /root/.pip/pip.log

1 个答案:

答案 0 :(得分:4)

该错误似乎表明mitmproxy与python 2.6.x不兼容。我假设语法是2.7.x或类似的新内容。

该行在2.4.3或2.6.6中对我不起作用,但在2.7.8中起作用。