破碎的pysftp' crypto_box_seedbytes'

时间:2017-12-11 05:20:05

标签: python-3.x pysftp

今天我使用pysftp的脚本给了我这个错误:

File "teleres_ftpexport.py", line 2, in <module>
      import pysftp
    File "/home/pierrot/.local/lib/python3.5/site-packages/pysftp/__init__.py", line 12, in <module>
      import paramiko
    File "/home/pierrot/.local/lib/python3.5/site-packages/paramiko/__init__.py", line 22, in <module>
      from paramiko.transport import SecurityOptions, Transport
    File "/home/pierrot/.local/lib/python3.5/site-packages/paramiko/transport.py", line 57, in <module>
      from paramiko.ed25519key import Ed25519Key
    File "/home/pierrot/.local/lib/python3.5/site-packages/paramiko/ed25519key.py", line 22, in <module>
      import nacl.signing
    File "/home/pierrot/.local/lib/python3.5/site-packages/nacl/signing.py", line 19, in <module>
      import nacl.bindings
    File "/home/pierrot/.local/lib/python3.5/site-packages/nacl/bindings/__init__.py", line 17, in <module>
      from nacl.bindings.crypto_box import (
    File "/home/pierrot/.local/lib/python3.5/site-packages/nacl/bindings/crypto_box.py", line 27, in <module>
      crypto_box_SEEDBYTES = lib.crypto_box_seedbytes()
    AttributeError: cffi library '_sodium' has no function, constant or global variable named 'crypto_box_seedbytes'

我尝试用

删除/重新安装pysftp
pip3 uninstall pysftp
pip3 install pysftp

但我仍然收到错误消息。我认为这个消息来自paramiko(删除它没有帮助)。任何想法如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

是的,paramiko 排序后,将安装pysftp(这是对paramiko的包装)。