Fedora 30 - ModuleNotFoundError: No module named 'nacl'
I installed dkimpy using
pip3 install dkimpy
on fedora 30. The generation of RSA keys succeeds. It fails when trying to create for ed25519 though. pep8 is installed as well (1.7.1). nacl is installed.
Traceback (most recent call last):
File "/usr/local/
load_
File "/usr/local/
priv_key = GenEd25519Keys(
File "/usr/local/
import nacl.signing # Yes, pep-8, but let's not make everyone install nacl
ModuleNotFoundE
Requirement already satisfied: pep8 in /usr/local/
nacl:
nacl-binutils-
nacl-devel-
python3-
nacl-20110221-
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- dkimpy Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Stuart Gathman
- Solved:
- 2019-06-11
- Last query:
- 2019-06-11
- Last reply:
- 2019-06-11
Scott Kitterman (kitterman) said : | #1 |
You've installed https:/
The one you need is https:/
Danie de Jager (danie.dejager) said : | #2 |
Hi, I have that installed too but still getting the error:
# dnf install python3-
Last metadata expiration check: 0:05:36 ago on Mon 10 Jun 2019 08:33:33 SAST.
Package python3-
# pip3 install libnacl
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Requirement already satisfied: libnacl in /usr/lib/
Scott Kitterman (kitterman) said : | #3 |
It's PyNaCl, not libnacl.
# pip3 install PyNaCl
Collecting PyNaCl
Downloading https:/
100% |██████
Requirement already satisfied: cffi>=1.4.1 in /usr/lib/
Requirement already satisfied: six in /usr/lib/
Installing collected packages: PyNaCl
Successfully installed PyNaCl-1.3.0
# ls /usr/local/
PyNaCl-
# ls /usr/local/
__init__.py __pycache__ _sodium.abi3.so bindings encoding.py exceptions.py hash.py hashlib.py public.py pwhash secret.py signing.py utils.py
root@l5580:/home# python3
Python 3.7.3 (default, Apr 3 2019, 05:39:12)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nacl
>>>
Also, the Fedora package is python3-pynacl. (And python2-pynacl) It is a version 1.3.0 - same as you get from pip.
Danie de Jager (danie.dejager) said : | #5 |
Thanks Stuart Gathman, that solved my question.
Offtopic but relevant: python3-libnacl is a different python wrapper for libnacl. It is not interchangeable with pynacl, but an alternate wrapping. I prefer libsodium a maintained and CPU optimized fork of libnacl - and in fact, python3-pynacl and python3-libnacl actually wrap libsodium, not libnacl.