Python3.6导入paramiko卡住

时间:2018-12-25 03:04:44

标签: python python-3.x paramiko

python3.6 import paramiko卡住了,我按ctrl + c获取下一个错误。

运行时环境:centos7.4,64位

代码:

#!/usr/bin/python3
print("import paramiko begin")
import paramiko
print("import paramiko end")

错误:

    import paramiko
  File "/usr/local/lib/python3.6/site-packages/paramiko/__init__.py", line 22, in <module>
    from paramiko.transport import SecurityOptions, Transport
  File "/usr/local/lib/python3.6/site-packages/paramiko/transport.py", line 90, in <module>
    from paramiko.ed25519key import Ed25519Key
  File "/usr/local/lib/python3.6/site-packages/paramiko/ed25519key.py", line 22, in <module>
    import nacl.signing
  File "/usr/local/lib64/python3.6/site-packages/nacl/signing.py", line 17, in <module>
    import nacl.bindings
  File "/usr/local/lib64/python3.6/site-packages/nacl/bindings/__init__.py", line 377, in <module>
    sodium_init()
  File "/usr/local/lib64/python3.6/site-packages/nacl/bindings/sodium_core.py", line 32, in sodium_init
    ffi.init_once(_sodium_init, "libsodium")
  File "/usr/local/lib64/python3.6/site-packages/nacl/bindings/sodium_core.py", line 22, in _sodium_init
    ensure(lib.sodium_init() != -1,

1 个答案:

答案 0 :(得分:-1)

似乎与this PyNaCl问题有关

对我来说,解决方法是不使用轮子安装PyNaCl:

pip install pynacl -I --no-binary pynacl

here那里得到它