[英]error in python install module
I need to install a module txsckjs
,but when I run pip install txsockjs
it shows me some error and I don't know what happened. 我需要安装模块txsckjs
,但是当我运行pip install txsockjs
它显示了一些错误,我不知道发生了什么。
The error is following: 错误如下:
(venv)lk@linux-7hhe:~/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/
Try replacing except Exception, e
with except Exception as e
in txsockjs/setup.py. 尝试在txsockjs / setup.py中将except Exception as e
except Exception, e
替换为except Exception, e
except Exception as e
。
As underlined by SilentMonk and Saket, Python version matters in this case. 正如SilentMonk和Saket所强调的那样,在这种情况下,Python版本很重要。 See Python try…except comma vs 'as' in except and the reference, PEP 3110 -- Catching Exceptions in Python 3000 . 请参阅except中的Python try…except逗号与“ as”,以及参考文献PEP 3110-Python 3000中的捕获异常 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.