2016-07-07 136 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