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/
Alec
  • 31,829
  • 7
  • 67
  • 114
IkarosKun
  • 463
  • 3
  • 15

2 Answers2

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.

Community
  • 1
  • 1
Saket Mehta
  • 2,438
  • 2
  • 23
  • 28
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.

Community
  • 1
  • 1
Tttt1228
  • 409
  • 5
  • 11