0

I am getting following error while trying to use 'pysftp' module in Jupyter Notebook:

End Goal: Download files from Unix server onto Windows folder automatically through a web-based application written in Python.

In this process, when I try to connect to WINSCP in order to allow python code to login to Unix server(username@hostname), I used 'pystftp' module however I get below error message:

Error Message: ModuleNotFoundError: No module named 'pysftp'

Action taken:

  1. pip list - to view the already installed packages in python; I doesn't show pysftp
  2. pip install pysftp - to install pysftp module; get below error when ran this in jupyter notebook

error message:

Collecting pysftp
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x00000227A34A2400>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pysftp/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x00000227A33BC4A8>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pysftp/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x00000227A33BCE80>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pysftp/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x00000227A33BCEB8>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pysftp/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x00000227A33BCE48>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pysftp/
  Could not find a version that satisfies the requirement pysftp (from versions: )
No matching distribution found for pysftp

Request: Please direct and help me achieve my end goal.

I am writing a code in Jupyter Notebook

Thanks, Puneet

buran
  • 13,682
  • 10
  • 36
  • 61
Puneet Khanna
  • 1
  • 1
  • 1
  • 1
  • I think your internet connection isn't stable enough for `pip` – Amr Keleg Jan 22 '20 at 10:14
  • Does this answer your question? [Error to install packages in python](https://stackoverflow.com/questions/49192842/error-to-install-packages-in-python) – Amr Keleg Jan 22 '20 at 10:16
  • pip was never able to complete the installation of your module, possibly due to poor connectivity. (You should see a *successfully installed* message) Once the module is installed and available for Python to use, you will not see the error. – Vishakha Lall Jan 22 '20 at 10:17

1 Answers1

1

At first suggestion: You should check the location for PYTHON installation path and from that directory go to cmd -> and type: pip installs pysftp. If the installation is successful then the problem is in your interpreter selection where your scripts are running.

autom99
  • 88
  • 3