尝试在Jupyter Notebook中使用'pysftp'模块时出现以下错误:
最终目标:通过使用Python编写的基于Web的应用程序将文件从Unix服务器自动下载到Windows文件夹中。
在此过程中,当我尝试连接到WINSCP以允许python代码登录到Unix服务器(用户名@主机名)时,我使用了“ pystftp”模块,但出现以下错误消息:
错误消息:ModuleNotFoundError: No module named 'pysftp'
已采取的操作:
pip list
-用python查看已经安装的软件包;我没有显示pysftp pip install pysftp
-安装pysftp模块;在jupyter笔记本中运行此错误得到以下错误错误消息:
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
请求: 请指导并帮助我实现最终目标。
我正在用Jupyter Notebook写代码
谢谢, 普尼特(Puneet)
答案 0 :(得分:0)
最初建议:您应检查 PYTHON安装路径的位置,然后从该目录转到cmd ->并输入: pip install pysftp 强>。如果安装成功,则问题出在运行脚本的解释器选择中。