1

8.2

When I install a new module with pip install PyNaCl it says it downloaded successfully, then I check with pip list and its there and when I run my python code I get "No Module Named "PyNaCl" error. It's not from the module because I tried with different ones and I get the same error.

Bozho
  • 41
  • 1
  • 2
  • 7
  • 1
    You likely have more than 1 python installation. Try `pip3.8 install ...` – Hymns For Disco Mar 02 '20 at 08:52
  • @HymnsForDisco I uninstalled all of them yesterday and i have only the 3.8.2 and I tried and I get `Requirement already satisfied: pynacl in c:\python38\lib\site-packages (1.3.0) Requirement already satisfied: six in c:\python38\lib\site-packages (from pynacl) (1.14.0) Requirement already satisfied: cffi>=1.4.1 in c:\python38\lib\site-packages (from pynacl) (1.14.0) Requirement already satisfied: pycparser in c:\python38\lib\site-packages (from cffi>=1.4.1->pynacl) (2.19)` – Bozho Mar 02 '20 at 08:55

3 Answers3

2

That's because while the pypi package is called PyNaCl, the actual library is called nacl, as can be seen in the official documentation.

Masklinn
  • 34,759
  • 3
  • 38
  • 57
0

PyNaCl's runtime module name is nacl, so it must be imported by import nacl.

Mikhail Burshteyn
  • 4,762
  • 14
  • 27
0

I resolved this issue by downloading and installing the python 3.8.2 package from here

I noticed in my text editor that the file I was trying to import was displaying 3.8.0

xilpex
  • 3,097
  • 2
  • 14
  • 45
JB Larson
  • 76
  • 2
  • 15