Create a device identity issue

following the create a device identity instructions while setting up a programing enviroment using python 3.11 idle i am getting an error
\st-device-sdk-c-ref\iot-core\tools\keygen\stdk-keygen.py", line 13, in
from nacl.signing import SigningKey, VerifyKey
ModuleNotFoundError: No module named ‘nacl’

after typing
python3 stdk-keygen.py --firmware switch_example_001

now as most appreciate, i am soo new to this it is untrue but i have the ability to learn, so i am just following instructions for now, prior to this error all was well and working as listed and followed to the letter

so can one of you please post what is missing so i can continue … my journey of discovery ish

Hi @fido that means that you need to install the module nacl

you can use

pip install pynacl

I recommended using a virtual environment to avoid conflict with another library installed on your system.

python3 -m venv .venv
source .venv/bin/activate
pip install pynacl

Thank you Alejandro, when i am next at my pc i will implement the code

Just as s supplement to the question, why did i get the error when i had followed the instructions prior to this and all went well, what did i do wrong or miss, for a complete beginer when errors appear i have no background knowledge of how to fix problems so having a little insight into why it happened would be very helpful as i progress

Do you follow this tutorial? In this tutorial libraries that need to be installed are explained, if you used the SmartThings Developer documentation here the information is more general. but I will take note of your comment :saluting_face:

I am following the first link you supplied Alejandro (Smartthings Developer documentation)

It is recomended reading when following @TAustin documentation on creating a connected device

My issue is i am new, nothing more, i find most instructions are writen with experienced users in mind, not beginers, i am experienced with graphics not git bash or Python IDLE or bin files… its a whole new world to me

Plus i retired away from computers 5 years ago or so, so for me, i really am a rookie

Not sure what your project is, but wanted to make sure you knew that you no longer need my package to create direct-connected devices on a Raspberry Pi. That support is now built-in to the Core SDK.

Of course even if you are using the new built-in support you still need to use the keygen tool, so that may be what has led you down that path?

1 Like

No project in particular Tod, your Lan drivers intrigued me, i have a NodeMCU as mentioned in the past, it can run Micro Python, so i thought it might be an idea to do some learning, i must admit at first it was confusing and still is but i am learning, even terminologys are new to me

You have writen the article that is linked in your profile so off i went and started learning, you recommended the ST article on device creation hence my post above

I dont get too much time at the Pc so when i do get time i usually forget what point i was at and end up going back over the same ground but its all good learning

1 Like