3
我使用下面的代碼做SFTP: #的/ opt/python3 /斌/ python3如何做sftp python 3?
import paramiko
import sys
host = '192.168.1.2'
port = 22622
transport = paramiko.Transport((host, port))
password = "[email protected]"
username = "web"
transport.connect(username = username, password = password)
sftp = paramiko.SFTPClient.from_transport(transport)
path = '/log/ERROR.LOG'
localpath = '/home/web/ERROR.LOG'
sftp.get(path, localpath)
sftp.close()
transport.close()
print ("Download done.")
但輸出爲:
Traceback (most recent call last):
File "c.py", line 2, in <module>
import paramiko
ImportError: No module named paramiko
是否有Python3沒有的paramiko模塊?
我必須使用什麼做sftp?