Quick test i get no error on import,as most of the time when i test stuff that can have problem virtual environment.
Then is isolated of all i done an installed before.
Then is isolated of all i done an installed before.
E:\div_code λ python -m venv pysftp_env E:\div_code λ cd pysftp_env\ E:\div_code\pysftp_env λ E:\div_code\pysftp_env\Scripts\activate (pysftp_env) E:\div_code\pysftp_env λ pip install pysftp Collecting pysftp ..... Successfully installed bcrypt-3.1.7 cffi-1.14.0 cryptography-2.8 paramiko-2.7.1 pycparser-2.19 pynacl-1.3.0 pys ftp-0.2.9 six-1.14.0 (pysftp_env) E:\div_code\pysftp_env λ python Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import pysftp >>> >>> pysftp.__version__ '0.2.9' >>> exit()Test connect:
(pysftp_env) E:\div_code\pysftp_env λ python Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import pysftp >>> >>> cnopts = pysftp.CnOpts() >>> cnopts.hostkeys = None >>> con = pysftp.Connection('198.18.8.139', username='tester', password='password', cnopts=cnopts) >>> con.listdir() ['testfile.txt'] >>> con.get('testfile.txt') >>> exit() (pysftp_env) E:\div_code\pysftp_env λ cat testfile.txt This is a test file created by Rebex Tiny SFTP server.