Locating Nitropy to run firmware update

Command line newb here, I’ve been trying to follow instructions to install and run nitropy to update my firmware, but am struggling to get it installed / locate the file so I can run the update. Can anyone help a beginner here? Thank you!

Clarity/additional information: Running on macOS, trying to update the newest Nitrokey 3C NFC.

If anyone needs any more detail to assist, please let me know! Help this little dummy out please! :slight_smile:

Hi. Did you follow the instructions that can be found here?

If installation was successful, the command should be installed here: /usr/local/bin/nitropy. You should be able to just call nitropy.

If not, we would need the output of pip3 install -U pynitrokey to see what went wrong during install.

2 Likes

Thanks @nku !

kemper@MacBook-Pro ~ % pip3 install -U pynitrokey
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pynitrokey in ./Library/Python/3.8/lib/python/site-packages (0.4.21)
Requirement already satisfied: tqdm in ./Library/Python/3.8/lib/python/site-packages (from pynitrokey) (4.64.0)
Requirement already satisfied: cryptography>=3.4.4 in ./Library/Python/3.8/lib/python/site-packages (from pynitrokey) (36.0.2)
Requirement already satisfied: cbor in ./Library/Python/3.8/lib/python/site-packages (from pynitrokey) (1.0.0)
Requirement already satisfied: python-dateutil in ./Library/Python/3.8/lib/python/site-packages (from pynitrokey) (2.8.2)
Requirement already satisfied: ecdsa in ./Library/Python/3.8/lib/python/site-packages (from pynitrokey) (0.17.0)
Requirement already satisfied: nkdfu in ./Library/Python/3.8/lib/python/site-packages (from pynitrokey) (0.1)
Requirement already satisfied: pyusb in ./Library/Python/3.8/lib/python/site-packages (from pynitrokey) (1.2.1)
Requirement already satisfied: urllib3 in ./Library/Python/3.8/lib/python/site-packages (from pynitrokey) (1.26.9)
Requirement already satisfied: intelhex in ./Library/Python/3.8/lib/python/site-packages (from pynitrokey) (2.3.0)
Requirement already satisfied: requests in ./Library/Python/3.8/lib/python/site-packages (from pynitrokey) (2.27.1)
Requirement already satisfied: click>=7.0 in ./Library/Python/3.8/lib/python/site-packages (from pynitrokey) (7.1.2)
Requirement already satisfied: fido2>=0.9.3 in ./Library/Python/3.8/lib/python/site-packages (from pynitrokey) (0.9.3)
Requirement already satisfied: spsdk<1.7.0,>=1.6.0 in ./Library/Python/3.8/lib/python/site-packages (from pynitrokey) (1.6.3)
Requirement already satisfied: cffi in ./Library/Python/3.8/lib/python/site-packages (from pynitrokey) (1.15.0)
Requirement already satisfied: pycparser in ./Library/Python/3.8/lib/python/site-packages (from cffi->pynitrokey) (2.21)
Requirement already satisfied: six in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (from fido2>=0.9.3->pynitrokey) (1.15.0)
Requirement already satisfied: pyserial<4,>=3.1 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (3.5)
Requirement already satisfied: asn1crypto<2,>=1.2 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (1.5.1)
Requirement already satisfied: bitstring<3.2,>=3.1 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (3.1.9)
Requirement already satisfied: pypemicro<0.2.0,>=0.1.9 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (0.1.9)
Requirement already satisfied: ruamel.yaml<0.18.0,>=0.17 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (0.17.21)
Requirement already satisfied: hexdump~=3.3 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (3.3)
Requirement already satisfied: sly==0.4 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (0.4)
Requirement already satisfied: commentjson<1,>=0.9 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (0.9.0)
Requirement already satisfied: libusbsio>=2.1.11 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (2.1.11)
Requirement already satisfied: pyocd<=0.31.0,>=0.28.3 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (0.31.0)
Requirement already satisfied: colorama<1,>=0.4.4 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (0.4.4)
Requirement already satisfied: fastjsonschema>=2.15.1 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (2.15.3)
Requirement already satisfied: pycryptodome<4,>=3.9.3 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (3.14.1)
Requirement already satisfied: click-option-group<0.6,>=0.3.0 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (0.5.3)
Requirement already satisfied: jinja2<3.1,>=2.11 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (3.0.3)
Requirement already satisfied: bincopy<17.11 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (17.10.1)
Requirement already satisfied: oscrypto~=1.2 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (1.3.0)
Requirement already satisfied: deepmerge==0.3.0 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (0.3.0)
Requirement already satisfied: crcmod==1.7 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (1.7)
Requirement already satisfied: pylink-square<0.11.9,>=0.8.2 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (0.11.1)
Requirement already satisfied: cmsis-pack-manager<0.3.0 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (0.2.10)
Requirement already satisfied: astunparse<2,>=1.6 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (1.6.3)
Requirement already satisfied: pyocd-pemicro<1.2.0,>=1.1.1 in ./Library/Python/3.8/lib/python/site-packages (from spsdk<1.7.0,>=1.6.0->pynitrokey) (1.1.3)
Requirement already satisfied: fire in ./Library/Python/3.8/lib/python/site-packages (from nkdfu->pynitrokey) (0.4.0)
Requirement already satisfied: libusb1>=1.9.3 in ./Library/Python/3.8/lib/python/site-packages (from nkdfu->pynitrokey) (3.0.0)
Requirement already satisfied: idna<4,>=2.5 in ./Library/Python/3.8/lib/python/site-packages (from requests->pynitrokey) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in ./Library/Python/3.8/lib/python/site-packages (from requests->pynitrokey) (2021.10.8)
Requirement already satisfied: charset-normalizer~=2.0.0 in ./Library/Python/3.8/lib/python/site-packages (from requests->pynitrokey) (2.0.12)
Requirement already satisfied: wheel<1.0,>=0.23.0 in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (from astunparse<2,>=1.6->spsdk<1.7.0,>=1.6.0->pynitrokey) (0.36.2)
Requirement already satisfied: humanfriendly in ./Library/Python/3.8/lib/python/site-packages (from bincopy<17.11->spsdk<1.7.0,>=1.6.0->pynitrokey) (10.0)
Requirement already satisfied: pyelftools in ./Library/Python/3.8/lib/python/site-packages (from bincopy<17.11->spsdk<1.7.0,>=1.6.0->pynitrokey) (0.28)
Requirement already satisfied: argparse-addons>=0.4.0 in ./Library/Python/3.8/lib/python/site-packages (from bincopy<17.11->spsdk<1.7.0,>=1.6.0->pynitrokey) (0.8.0)
Requirement already satisfied: pyyaml>=3.12 in ./Library/Python/3.8/lib/python/site-packages (from cmsis-pack-manager<0.3.0->spsdk<1.7.0,>=1.6.0->pynitrokey) (5.4.1)
Requirement already satisfied: appdirs>=1.4 in ./Library/Python/3.8/lib/python/site-packages (from cmsis-pack-manager<0.3.0->spsdk<1.7.0,>=1.6.0->pynitrokey) (1.4.4)
Requirement already satisfied: milksnake>=0.1.2 in ./Library/Python/3.8/lib/python/site-packages (from cmsis-pack-manager<0.3.0->spsdk<1.7.0,>=1.6.0->pynitrokey) (0.1.5)
Requirement already satisfied: lark-parser<0.8.0,>=0.7.1 in ./Library/Python/3.8/lib/python/site-packages (from commentjson<1,>=0.9->spsdk<1.7.0,>=1.6.0->pynitrokey) (0.7.8)
Requirement already satisfied: MarkupSafe>=2.0 in ./Library/Python/3.8/lib/python/site-packages (from jinja2<3.1,>=2.11->spsdk<1.7.0,>=1.6.0->pynitrokey) (2.1.1)
Requirement already satisfied: future in ./Library/Python/3.8/lib/python/site-packages (from pylink-square<0.11.9,>=0.8.2->spsdk<1.7.0,>=1.6.0->pynitrokey) (0.18.2)
Requirement already satisfied: psutil>=5.2.2 in ./Library/Python/3.8/lib/python/site-packages (from pylink-square<0.11.9,>=0.8.2->spsdk<1.7.0,>=1.6.0->pynitrokey) (5.9.0)
Requirement already satisfied: intervaltree<4.0,>=3.0.2 in ./Library/Python/3.8/lib/python/site-packages (from pyocd<=0.31.0,>=0.28.3->spsdk<1.7.0,>=1.6.0->pynitrokey) (3.1.0)
Requirement already satisfied: capstone<5.0,>=4.0 in ./Library/Python/3.8/lib/python/site-packages (from pyocd<=0.31.0,>=0.28.3->spsdk<1.7.0,>=1.6.0->pynitrokey) (4.0.2)
Requirement already satisfied: naturalsort<2.0,>=1.5 in ./Library/Python/3.8/lib/python/site-packages (from pyocd<=0.31.0,>=0.28.3->spsdk<1.7.0,>=1.6.0->pynitrokey) (1.5.1)
Requirement already satisfied: prettytable<3.0,>=2.0 in ./Library/Python/3.8/lib/python/site-packages (from pyocd<=0.31.0,>=0.28.3->spsdk<1.7.0,>=1.6.0->pynitrokey) (2.5.0)
Requirement already satisfied: hidapi in ./Library/Python/3.8/lib/python/site-packages (from pyocd<=0.31.0,>=0.28.3->spsdk<1.7.0,>=1.6.0->pynitrokey) (0.11.2)
Requirement already satisfied: ruamel.yaml.clib>=0.2.6 in ./Library/Python/3.8/lib/python/site-packages (from ruamel.yaml<0.18.0,>=0.17->spsdk<1.7.0,>=1.6.0->pynitrokey) (0.2.6)
Requirement already satisfied: termcolor in ./Library/Python/3.8/lib/python/site-packages (from fire->nkdfu->pynitrokey) (1.1.0)
Requirement already satisfied: sortedcontainers<3.0,>=2.0 in ./Library/Python/3.8/lib/python/site-packages (from intervaltree<4.0,>=3.0.2->pyocd<=0.31.0,>=0.28.3->spsdk<1.7.0,>=1.6.0->pynitrokey) (2.4.0)
Requirement already satisfied: wcwidth in ./Library/Python/3.8/lib/python/site-packages (from prettytable<3.0,>=2.0->pyocd<=0.31.0,>=0.28.3->spsdk<1.7.0,>=1.6.0->pynitrokey) (0.2.5)
Requirement already satisfied: setuptools>=19.0 in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (from hidapi->pyocd<=0.31.0,>=0.28.3->spsdk<1.7.0,>=1.6.0->pynitrokey) (49.2.1)
kemper@MacBook-Pro ~ % cd /usr/local/bin/nitropy
cd: no such file or directory: /usr/local/bin/nitropy
kemper@MacBook-Pro ~ % 

/usr/local/bin/nitropy should be the executeable and /usr/local/bin/ should be the directory.

From the output it seems that everything got installed correctly. Can you just execute by entering nitropy or by /usr/local/bin/nitropy?

As you are on a Mac, you could also use Spotlight ( ⌘ + Space) to search for the binary.

On my Apple silicon based Mac, I use Anaconda Python distribution and my nitropy is installed under /User/myself/opt/anaconda3/bin/nitropy and I can execute it just by typing nitropy in a terminal.

1 Like