2016-07-07 138 views
0

我需要安装一个模块txsckjs,但是当我运行pip install txsockjs它让我看到了一些错误,我不知道发生了什么。错误在python安装模块

错误是以下几点:

(venv)[email protected]:~/MyImprove/project> pip install txsockjs 
Collecting txsockjs 
    Using cached txsockjs-1.2.2.tar.gz 
    Complete output from command python setup.py egg_info: 
    Traceback (most recent call last): 
     File "<string>", line 1, in <module> 
     File "/tmp/pip-build-5pxhyr0u/txsockjs/setup.py", line 73 
     except Exception, e: 
         ^
    SyntaxError: invalid syntax 

---------------------------------------- 
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-5pxhyr0u/txsockjs/ 
+2

这是你所使用的Python版本? – SilentMonk

+1

似乎您正在使用Python3,其中此语法无效。 –

回答

1

这可能是你正在使用的Python版本是没有用给定模块兼容。

enter image description here

我的Python 3.5.2,并能reporduce您的错误。它应该在Python 2上工作我想。

+0

非常感谢!我会尝试一下! – MerleLiuKun