0

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.

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/
2
  • 3
    Which is the python version you are using? Commented Jul 7, 2016 at 6:39
  • 2
    Seems you are using Python3, where this syntax is invalid. Commented Jul 7, 2016 at 6:49

2 Answers 2

1

It is possible that the version of Python you are using is not compatible with the given module.

enter image description here

I have Python 3.5.2 and was able to reporduce your error. It should work on Python 2 I suppose.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks a lot!I will do a try!
0

Try replacing except Exception, e with except Exception as e in txsockjs/setup.py.

As underlined by SilentMonk and Saket, Python version matters in this case. See Python try…except comma vs 'as' in except and the reference, PEP 3110 -- Catching Exceptions in Python 3000.

1 Comment

Thanks a lot. ohoh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.