0

尝试在 Windows 7 上使用 Python 3.3 安装 Python SSH 1.8.0 库时出现编译错误。我很惊讶地收到语法错误通知。

C:\Users\egargio\Downloads\ssh-1.8.0\ssh-1.8.0>C:\Python33\python setup.py insta
ll
running install
running build
running build_py
running install_lib
byte-compiling C:\Python33\Lib\site-packages\ssh\auth_handler.py to auth_handler
.cpython-33.pyc
  File "C:\Python33\Lib\site-packages\ssh\auth_handler.py", line 311
    except SSHException, e:
                       ^
SyntaxError: invalid syntax

byte-compiling C:\Python33\Lib\site-packages\ssh\channel.py to channel.cpython-3
3.pyc
  File "C:\Python33\Lib\site-packages\ssh\channel.py", line 610
    except PipeTimeout, e:
                      ^
SyntaxError: invalid syntax


byte-compiling C:\Python33\Lib\site-packages\ssh\message.py to message.cpython-3
3.pyc
  File "C:\Python33\Lib\site-packages\ssh\message.py", line 279
    if i > 0xffffffffL:
                     ^
SyntaxError: invalid syntax

byte-compiling C:\Python33\Lib\site-packages\ssh\packet.py to packet.cpython-33.
pyc
  File "C:\Python33\Lib\site-packages\ssh\packet.py", line 96
    self.__sequence_number_out = 0L
                                  ^
SyntaxError: invalid syntax

byte-compiling C:\Python33\Lib\site-packages\ssh\pkey.py to pkey.cpython-33.pyc
  File "C:\Python33\Lib\site-packages\ssh\pkey.py", line 307
    except base64.binascii.Error, e:
                                ^
SyntaxError: invalid syntax



running install_egg_info
Removing C:\Python33\Lib\site-packages\ssh-1.8.0-py3.3.egg-info
Writing C:\Python33\Lib\site-packages\ssh-1.8.0-py3.3.egg-info

请问,有什么建议吗?谢谢。

4

1 回答 1

0

该库尚未移植到 Python 3。您可能能够找到具有或使用 Python 2.7 的库。

于 2013-05-17T19:34:33.987 回答