# Nitrokey 3 update to 1.7.2 not working

**URL:** https://support.nitrokey.com/t/nitrokey-3-update-to-1-7-2-not-working/6539
**Category:** FIDO2 / Nitrokey 3
**Created:** [September 25, 2024, 6:28pm UTC](https://support.nitrokey.com/t/nitrokey-3-update-to-1-7-2-not-working/6539 "2024-09-25T18:28:24Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![u2ap](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/u/258eb7/32.png) [@u2ap](https://support.nitrokey.com/u/u2ap)
#### Post date: [September 25, 2024, 6:28pm UTC](https://support.nitrokey.com/t/nitrokey-3-update-to-1-7-2-not-working/6539/1 "2024-09-25T18:28:24Z")

</div>

I’m running Qubes.

I tried using nitropy, but I can’t get it installed on either debian or fedora. it says there’s an error.

I successfully installed nitrokey app 2 and it can read my nitrokey.

I attempted the update using app 2 and it said nitrokey failed to update.

---

<div class="post-metadata">

### Author: ![u2ap](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/u/258eb7/32.png) [@u2ap](https://support.nitrokey.com/u/u2ap)
#### Post date: [September 25, 2024, 6:41pm UTC](https://support.nitrokey.com/t/nitrokey-3-update-to-1-7-2-not-working/6539/2 "2024-09-25T18:41:47Z")

</div>

I just tried installing pynitrokey on whonix, just to see.

it’s the same error I got with debian and fedora.

pip failed to build package: pyscard

---

<div class="post-metadata">

### Author: ![u2ap](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/u/258eb7/32.png) [@u2ap](https://support.nitrokey.com/u/u2ap)
#### Post date: [September 25, 2024, 6:47pm UTC](https://support.nitrokey.com/t/nitrokey-3-update-to-1-7-2-not-working/6539/3 "2024-09-25T18:47:23Z")

</div>

I have the full terminal output below. Below that is the log it references.

Fatal error from pip prevented installation. Full pip output in file:  
/home/user/.local/pipx/logs/cmd\_2024-09-25\_18.38.59\_1\_pip\_errors.log

pip failed to build package:  
pyscard

Some possibly relevant errors from pip install:  
error: subprocess-exited-with-error  
smartcard/scard/helpers.c:28:10: fatal error: winscard.h: No such file or directory  
error: command ‘/usr/bin/x86\_64-linux-gnu-gcc’ failed with exit code 1  
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyscard)

Error installing pynitrokey.  
zsh: exit 1 pipx install pynitrokey

Now for the log file

## PIP STDOUT

Collecting pynitrokey  
Downloading pynitrokey-0.6.0-py3-none-any.whl.metadata (4.5 kB)  
Collecting certifi\>=14.5.14 (from pynitrokey)  
Downloading certifi-2024.8.30-py3-none-any.whl.metadata (2.2 kB)  
Collecting cffi (from pynitrokey)  
Downloading cffi-1.17.1-cp311-cp311-manylinux\_2\_17\_x86\_64.manylinux2014\_x86\_64.whl.metadata (1.5 kB)  
Collecting click\<=8.1.3,\>=8.0 (from pynitrokey)  
Downloading click-8.1.3-py3-none-any.whl.metadata (3.2 kB)  
Collecting cryptography\<44,\>=41.0.4 (from pynitrokey)  
Downloading cryptography-43.0.1-cp39-abi3-manylinux\_2\_28\_x86\_64.whl.metadata (5.4 kB)  
Collecting ecdsa (from pynitrokey)  
Downloading ecdsa-0.19.0-py2.py3-none-any.whl.metadata (29 kB)  
Collecting fido2\<2,\>=1.1.2 (from pynitrokey)  
Downloading fido2-1.1.3-py3-none-any.whl.metadata (1.4 kB)  
Collecting intelhex (from pynitrokey)  
Downloading intelhex-2.3.0-py2.py3-none-any.whl.metadata (2.7 kB)  
Collecting nkdfu (from pynitrokey)  
Downloading nkdfu-0.2-py3-none-any.whl.metadata (1.4 kB)  
Collecting nitrokey~=0.2.0rc1 (from pynitrokey)  
Downloading nitrokey-0.2.0-py3-none-any.whl.metadata (4.9 kB)  
Collecting python-dateutil~=2.7.0 (from pynitrokey)  
Downloading python\_dateutil-2.7.5-py2.py3-none-any.whl.metadata (7.5 kB)  
Collecting pyusb (from pynitrokey)  
Downloading pyusb-1.2.1-py3-none-any.whl.metadata (2.2 kB)  
Collecting requests (from pynitrokey)  
Downloading requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)  
Collecting tqdm (from pynitrokey)  
Downloading tqdm-4.66.5-py3-none-any.whl.metadata (57 kB)  
Collecting tlv8 (from pynitrokey)  
Downloading tlv8-0.10.0.tar.gz (16 kB)  
Preparing metadata (setup.py): started  
Preparing metadata (setup.py): finished with status ‘done’  
Collecting typing\_extensions~=4.3.0 (from pynitrokey)  
Downloading typing\_extensions-4.3.0-py3-none-any.whl.metadata (6.3 kB)  
Collecting click-aliases (from pynitrokey)  
Downloading click\_aliases-1.0.4-py3-none-any.whl.metadata (1.7 kB)  
Collecting semver (from pynitrokey)  
Downloading semver-3.0.2-py3-none-any.whl.metadata (5.0 kB)  
Collecting nethsm\<2,\>=1.2.1 (from pynitrokey)  
Downloading nethsm-1.2.1-py3-none-any.whl.metadata (5.8 kB)  
Collecting pyscard (from pynitrokey)  
Downloading pyscard-2.1.1.tar.gz (153 kB)  
Installing build dependencies: started  
Installing build dependencies: finished with status ‘done’  
Getting requirements to build wheel: started  
Getting requirements to build wheel: finished with status ‘done’  
Preparing metadata (pyproject.toml): started  
Preparing metadata (pyproject.toml): finished with status ‘done’  
Collecting asn1crypto (from pynitrokey)  
Downloading asn1crypto-1.5.1-py2.py3-none-any.whl.metadata (13 kB)  
Collecting pycparser (from cffi-\>pynitrokey)  
Downloading pycparser-2.22-py3-none-any.whl.metadata (943 bytes)  
Collecting urllib3\<2.1,\>=2.0 (from nethsm\<2,\>=1.2.1-\>pynitrokey)  
Downloading urllib3-2.0.7-py3-none-any.whl.metadata (6.6 kB)  
Collecting crcmod\<2.0,\>=1.7 (from nitrokey~=0.2.0rc1-\>pynitrokey)  
Downloading crcmod-1.7.tar.gz (89 kB)  
Preparing metadata (setup.py): started  
Preparing metadata (setup.py): finished with status ‘done’  
Collecting hidapi\<0.15,\>=0.14 (from nitrokey~=0.2.0rc1-\>pynitrokey)  
Downloading hidapi-0.14.0.post2-cp311-cp311-manylinux\_2\_17\_x86\_64.manylinux2014\_x86\_64.whl.metadata (3.6 kB)  
Collecting protobuf\<6.0,\>=5.26 (from nitrokey~=0.2.0rc1-\>pynitrokey)  
Downloading protobuf-5.28.2-cp38-abi3-manylinux2014\_x86\_64.whl.metadata (592 bytes)  
Collecting pyserial\<4.0,\>=3.5 (from nitrokey~=0.2.0rc1-\>pynitrokey)  
Downloading pyserial-3.5-py2.py3-none-any.whl.metadata (1.6 kB)  
Collecting six\>=1.9.0 (from ecdsa-\>pynitrokey)  
Downloading six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)  
Collecting charset-normalizer\<4,\>=2 (from requests-\>pynitrokey)  
Downloading charset\_normalizer-3.3.2-cp311-cp311-manylinux\_2\_17\_x86\_64.manylinux2014\_x86\_64.whl.metadata (33 kB)  
Collecting idna\<4,\>=2.5 (from requests-\>pynitrokey)  
Downloading idna-3.10-py3-none-any.whl.metadata (10 kB)  
INFO: pip is looking at multiple versions of click-aliases to determine which version is compatible with other requirements. This could take a while.  
Collecting click-aliases (from pynitrokey)  
Downloading click\_aliases-1.0.3-py3-none-any.whl.metadata (1.6 kB)  
Downloading click\_aliases-1.0.2-py3-none-any.whl.metadata (1.4 kB)  
Downloading click\_aliases-1.0.1-py2.py3-none-any.whl.metadata (1.6 kB)  
Collecting fire (from nkdfu-\>pynitrokey)  
Downloading fire-0.6.0.tar.gz (88 kB)  
Preparing metadata (setup.py): started  
Preparing metadata (setup.py): finished with status ‘done’  
Collecting libusb1\>=1.9.3 (from nkdfu-\>pynitrokey)  
Downloading libusb1-3.1.0-py3-none-any.whl.metadata (15 kB)  
Requirement already satisfied: setuptools\>=19.0 in ./.local/pipx/shared/lib/python3.11/site-packages (from hidapi\<0.15,\>=0.14-\>nitrokey~=0.2.0rc1-\>pynitrokey) (75.1.0)  
Collecting termcolor (from fire-\>nkdfu-\>pynitrokey)  
Downloading termcolor-2.4.0-py3-none-any.whl.metadata (6.1 kB)  
Downloading pynitrokey-0.6.0-py3-none-any.whl (164 kB)  
Downloading certifi-2024.8.30-py3-none-any.whl (167 kB)  
Downloading click-8.1.3-py3-none-any.whl (96 kB)  
Downloading cryptography-43.0.1-cp39-abi3-manylinux\_2\_28\_x86\_64.whl (4.0 MB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.0/4.0 MB 699.9 kB/s eta 0:00:00  
Downloading cffi-1.17.1-cp311-cp311-manylinux\_2\_17\_x86\_64.manylinux2014\_x86\_64.whl (467 kB)  
Downloading fido2-1.1.3-py3-none-any.whl (208 kB)  
Downloading nethsm-1.2.1-py3-none-any.whl (709 kB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 709.8/709.8 kB 1.2 MB/s eta 0:00:00  
Downloading nitrokey-0.2.0-py3-none-any.whl (161 kB)  
Downloading ecdsa-0.19.0-py2.py3-none-any.whl (149 kB)  
Downloading python\_dateutil-2.7.5-py2.py3-none-any.whl (225 kB)  
Downloading requests-2.32.3-py3-none-any.whl (64 kB)  
Downloading semver-3.0.2-py3-none-any.whl (17 kB)  
Downloading typing\_extensions-4.3.0-py3-none-any.whl (25 kB)  
Downloading asn1crypto-1.5.1-py2.py3-none-any.whl (105 kB)  
Downloading click\_aliases-1.0.1-py2.py3-none-any.whl (3.4 kB)  
Downloading intelhex-2.3.0-py2.py3-none-any.whl (50 kB)  
Downloading nkdfu-0.2-py3-none-any.whl (16 kB)  
Downloading pyusb-1.2.1-py3-none-any.whl (58 kB)  
Downloading tqdm-4.66.5-py3-none-any.whl (78 kB)  
Downloading charset\_normalizer-3.3.2-cp311-cp311-manylinux\_2\_17\_x86\_64.manylinux2014\_x86\_64.whl (140 kB)  
Downloading hidapi-0.14.0.post2-cp311-cp311-manylinux\_2\_17\_x86\_64.manylinux2014\_x86\_64.whl (705 kB)  
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 705.4/705.4 kB 1.3 MB/s eta 0:00:00  
Downloading idna-3.10-py3-none-any.whl (70 kB)  
Downloading libusb1-3.1.0-py3-none-any.whl (62 kB)  
Downloading protobuf-5.28.2-cp38-abi3-manylinux2014\_x86\_64.whl (316 kB)  
Downloading pyserial-3.5-py2.py3-none-any.whl (90 kB)  
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)  
Downloading urllib3-2.0.7-py3-none-any.whl (124 kB)  
Downloading pycparser-2.22-py3-none-any.whl (117 kB)  
Downloading termcolor-2.4.0-py3-none-any.whl (7.7 kB)  
Building wheels for collected packages: tlv8, pyscard, crcmod, fire  
Building wheel for tlv8 (setup.py): started  
Building wheel for tlv8 (setup.py): finished with status ‘done’  
Created wheel for tlv8: filename=tlv8-0.10.0-py3-none-any.whl size=11247 sha256=efcb0afd0402bddbe831a6a0aa315110b102da27dbea445bb57fc64418eeb05e  
Stored in directory: /home/user/.cache/pip/wheels/2b/1a/08/e5ec822f81c190e6673c54607655fc356d33e5c25fe4bf5e8e  
Building wheel for pyscard (pyproject.toml): started  
Building wheel for pyscard (pyproject.toml): finished with status ‘error’  
Building wheel for crcmod (setup.py): started  
Building wheel for crcmod (setup.py): finished with status ‘done’  
Created wheel for crcmod: filename=crcmod-1.7-py3-none-any.whl size=18835 sha256=4d6c718c4434821eca080cca4840b2a4c63f1cb827363fe89578da6982895b9c  
Stored in directory: /home/user/.cache/pip/wheels/23/94/7a/8cb7d14597e6395ce969933f01aed9ea8fa5f5b4d4c8a61e99  
Building wheel for fire (setup.py): started  
Building wheel for fire (setup.py): finished with status ‘done’  
Created wheel for fire: filename=fire-0.6.0-py2.py3-none-any.whl size=117030 sha256=807f7ffc42db5f7255c8e1ae1cb86c8f30d999b7590bbfe4d135257541fad5b9  
Stored in directory: /home/user/.cache/pip/wheels/6a/f3/0c/fa347dfa663f573462c6533d259c2c859e97e103d1ce21538f  
Successfully built tlv8 crcmod fire  
Failed to build pyscard

## PIP STDERR

error: subprocess-exited-with-error

× Building wheel for pyscard (pyproject.toml) did not run successfully.  
│ exit code: 1  
╰─\> [16 lines of output]  
/tmp/user/1000/pip-build-env-g5hr8wc7/overlay/lib/python3.11/site-packages/setuptools/\_distutils/dist.py:261: UserWarning: Unknown distribution option: ‘test\_suite’  
warnings.warn(msg)  
running bdist\_wheel  
running build  
running build\_py  
running build\_ext  
building ‘smartcard.scard.\_scard’ extension  
swigging smartcard/scard/scard.i to smartcard/scard/scard\_wrap.c  
swig -python -outdir smartcard/scard -DPCSCLITE -o smartcard/scard/scard\_wrap.c smartcard/scard/scard.i  
creating build/temp.linux-x86\_64-cpython-311/smartcard/scard  
x86\_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DVER\_PRODUCTVERSION=2,1,1,0000 -DVER\_PRODUCTVERSION\_STR=2.1.1 -DPCSCLITE=1 -Ismartcard/scard/ -I/usr/include/PCSC -I/usr/local/include/PCSC -I/home/user/.local/pipx/venvs/pynitrokey/include -I/usr/include/python3.11 -c smartcard/scard/helpers.c -o build/temp.linux-x86\_64-cpython-311/smartcard/scard/helpers.o  
smartcard/scard/helpers.c:28:10: fatal error: winscard.h: No such file or directory  
28 | #include \<winscard.h\>  
| ^ ~~~~~~~~~~~  
compilation terminated.  
error: command ‘/usr/bin/x86\_64-linux-gnu-gcc’ failed with exit code 1  
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.  
ERROR: Failed building wheel for pyscard  
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyscard)

---

<div class="post-metadata">

### Author: ![nku](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/n/2bfe46/32.png) [@nku](https://support.nitrokey.com/u/nku)
#### Post date: [September 25, 2024, 8:47pm UTC](https://support.nitrokey.com/t/nitrokey-3-update-to-1-7-2-not-working/6539/4 "2024-09-25T20:47:43Z")

</div>

[https://docs.nitrokey.com/software/nitropy/all-platforms/installation.html#wrong-python-version](https://docs.nitrokey.com/software/nitropy/all-platforms/installation.html#wrong-python-version)

---

<div class="post-metadata">

### Author: ![upity](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/u/e9bcb4/32.png) [@upity](https://support.nitrokey.com/u/upity)
#### Post date: [September 25, 2024, 9:54pm UTC](https://support.nitrokey.com/t/nitrokey-3-update-to-1-7-2-not-working/6539/5 "2024-09-25T21:54:10Z")

</div>

I had the same problem with nitropy not installing a while back.

The docs nku mentioned say to install python 3.9 but how to do that is left up to you to figure out. I found several sources all saying to install a bunch of dependencies and none of the guides said all the same ones. So which one do I follow?

Please help.

---

<div class="post-metadata">

### Author: ![nku](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/n/2bfe46/32.png) [@nku](https://support.nitrokey.com/u/nku)
#### Post date: [September 26, 2024, 5:06am UTC](https://support.nitrokey.com/t/nitrokey-3-update-to-1-7-2-not-working/6539/6 "2024-09-26T05:06:41Z")

</div>

Nix Package Manager would easily give you older Python versions.

> [@Can not upgrade firmware - missing libcrypto](https://support.nitrokey.com/t/can-not-upgrade-firmware-missing-libcrypto/5566/5):
>
> This is a bummer. Seems like nitrokey is [not supporting python 3.11](https://docs.nitrokey.com/software/nitropy/all-platforms/installation#wrong-python-version) that is shipped with Debian 12 Bookworm. I could recreate the issue and found a fix by using Nix packages. Using a VM for firmware update is not recommended! I have done it many times but this might break anytime. vagrant box add debian/bookworm64 --provider virtualbox cat \> Vagrantfile \<\<"eof" Vagrant.configure("2") do |config| config.vm.box = "debian/bookworm64" config.vm.provider "virtualbox" do |vb| # We need more …
