-1

希望你能帮忙。我是 Ubuntu 的新手,所以提前道歉。

我正在运行 Ubuntu 16.04 并尝试在 python3.5.2 中安装 netmiko

我遇到了导致安装失败的 pynacl 问题。我收到的错误消息类型如下:

/tmp/pip-install-d4reycz5/pynacl/src/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c:在函数'crypto_hash_sha256.constprop'中:/tmp/pip-install-d4reycz5/pynacl/src/ libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c:205:31:警告:迭代 64 调用未定义的行为 [-Waggressive-loop-optimizations] state->buf[r + i] = in[i]; ^ /tmp/pip-install-d4reycz5/pynacl/src/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c:204:9:注意:包含循环 for (i = 0; i < inlen; i++) { ^

CC       stream2.o
CCLD     stream2

/tmp/pip-install-d4reycz5/pynacl/src/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c:在函数'crypto_hash_sha256.constprop'中:/tmp/pip-install-d4reycz5/pynacl/src/ libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c:205:31:警告:迭代 64 调用未定义的行为 [-Waggressive-loop-optimizations] state->buf[r + i] = in[i]; ^

/tmp/pip-install-d4reycz5/pynacl/src/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c:204:9:注意:包含循环 for (i = 0; i < inlen; i++) { ^

/tmp/pip-install-d4reycz5/pynacl/src/libsodium/build-aux/test-driver:第 107 行:19878 非法指令(核心转储)“$@”> $log_file 2>&1

失败:框/tmp/pip-install-d4reycz5/pynacl/src/libsodium/build-aux/test-driver:第 107 行:19885 非法指令(核心转储)“$@”> $log_file 2>&1

失败:box2 /tmp/pip-install-d4reycz5/pynacl/src/libsodium/build-aux/test-driver:第 107 行:19892 非法指令(核心转储)“$@”> $log_file 2>&1

失败:box7 /tmp/pip-install-d4reycz5/pynacl/src/libsodium/build-aux/test-driver:第 107 行:19899 非法指令(核心转储)“$@”> $log_file 2>&1

失败:box8 /tmp/pip-install-d4reycz5/pynacl/src/libsodium/build-aux/test-driver:第 107 行:19906 非法指令(核心转储)“$@”> $log_file 2>&1

失败:box_easy /tmp/pip-install-d4reycz5/pynacl/src/libsodium/build-aux/test-driver:第 107 行:19913 非法指令(核心转储)“$@”> $log_file 2>&1

失败:box_easy2 /tmp/pip-install-d4reycz5/pynacl/src/libsodium/build-aux/test-driver:第 107 行:19920 非法指令(核心转储)“$@”> $log_file 2>&1 失败:box_seal

我相信我拥有所有必要的模块,例如 libsodium 等。期待您的来信。

菲尔

4

1 回答 1

0

我想我已经找到了解决方案。看来 Netmiko 仅支持 Python3.6 及更高版本。

已安装 Python3.8.5,它似乎正在工作。

于 2020-09-19T12:25:30.033 回答