尝试在 Windows XP PC 上安装 Paramiko。我正在运行 Python 3.3.1。环境变量设置为 C:\Python33\;C
我安装了 PyCrypto,没有任何问题。
我已经尝试过 Paramiko 版本 1.9、1.10 和 master 分支版本。
执行 python setup.py install 时出现这些错误:
C:\temp\paramiko-1.10\paramiko-1.10>python setup.py install
running install
running build
running build_py
creating build
creating build\lib
creating build\lib\paramiko
copying paramiko\agent.py -> build\lib\paramiko
copying paramiko\auth_handler.py -> build\lib\paramiko
copying paramiko\ber.py -> build\lib\paramiko
copying paramiko\buffered_pipe.py -> build\lib\paramiko
copying paramiko\channel.py -> build\lib\paramiko
copying paramiko\client.py -> build\lib\paramiko
copying paramiko\common.py -> build\lib\paramiko
copying paramiko\compress.py -> build\lib\paramiko
copying paramiko\config.py -> build\lib\paramiko
copying paramiko\dsskey.py -> build\lib\paramiko
copying paramiko\file.py -> build\lib\paramiko
copying paramiko\hostkeys.py -> build\lib\paramiko
copying paramiko\kex_gex.py -> build\lib\paramiko
copying paramiko\kex_group1.py -> build\lib\paramiko
copying paramiko\logging22.py -> build\lib\paramiko
copying paramiko\message.py -> build\lib\paramiko
copying paramiko\packet.py -> build\lib\paramiko
copying paramiko\pipe.py -> build\lib\paramiko
copying paramiko\pkey.py -> build\lib\paramiko
copying paramiko\primes.py -> build\lib\paramiko
copying paramiko\proxy.py -> build\lib\paramiko
copying paramiko\resource.py -> build\lib\paramiko
copying paramiko\rsakey.py -> build\lib\paramiko
copying paramiko\server.py -> build\lib\paramiko
copying paramiko\sftp.py -> build\lib\paramiko
copying paramiko\sftp_attr.py -> build\lib\paramiko
copying paramiko\sftp_client.py -> build\lib\paramiko
copying paramiko\sftp_file.py -> build\lib\paramiko
copying paramiko\sftp_handle.py -> build\lib\paramiko
copying paramiko\sftp_server.py -> build\lib\paramiko
copying paramiko\sftp_si.py -> build\lib\paramiko
copying paramiko\ssh_exception.py -> build\lib\paramiko
copying paramiko\transport.py -> build\lib\paramiko
copying paramiko\util.py -> build\lib\paramiko
copying paramiko\win_pageant.py -> build\lib\paramiko
copying paramiko\__init__.py -> build\lib\paramiko
running install_lib
byte-compiling C:\Python33\Lib\site-packages\paramiko\auth_handler.py to auth_handler.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\auth_handler.py", line 311
except SSHException, e:
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\channel.py to channel.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\channel.py", line 618
except PipeTimeout, e:
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\client.py to client.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\client.py", line 450
except SSHException, e:
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\dsskey.py to dsskey.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\dsskey.py", line 187
except BERException, x:
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\hostkeys.py to hostkeys.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\hostkeys.py", line 82
except binascii.Error, e:
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\kex_group1.py to kex_group1.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\kex_group1.py", line 35
P = 0xFFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFFFFL
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\message.py to message.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\message.py", line 280
if i > 0xffffffffL:
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\packet.py to packet.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\packet.py", line 97
self.__sequence_number_out = 0L
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\pkey.py to pkey.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\pkey.py", line 307
except base64.binascii.Error, e:
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\proxy.py to proxy.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\proxy.py", line 62
except IOError, e:
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\server.py to server.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\server.py", line 605
except Exception, e:
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\sftp_attr.py to sftp_attr.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\sftp_attr.py", line 47
FLAG_EXTENDED = 0x80000000L
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\sftp_client.py to sftp_client.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\sftp_client.py", line 88
except EOFError, x:
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\sftp_file.py to sftp_file.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\sftp_file.py", line 467
except Exception, x:
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\sftp_handle.py to sftp_handle.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\sftp_handle.py", line 103
except IOError, e:
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\sftp_server.py to sftp_server.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\sftp_server.py", line 95
except Exception, e:
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\transport.py to transport.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\transport.py", line 295
except socket.error, e:
^
SyntaxError: invalid syntax
byte-compiling C:\Python33\Lib\site-packages\paramiko\util.py to util.cpython-33.pyc
File "C:\Python33\Lib\site-packages\paramiko\util.py", line 51
out = 0L
^
SyntaxError: invalid syntax
running install_egg_info
Removing C:\Python33\Lib\site-packages\paramiko-1.10.1-py3.3.egg-info
Writing C:\Python33\Lib\site-packages\paramiko-1.10.1-py3.3.egg-info