Hi All,
Just for the records, i've recently upgraded from Ubuntu 22.04 to 24.04, and electrum said even after follow the instructions:
Error: No module named 'qrcode'. Try 'sudo python3 -m pip install <module-name>'
Then upgraded to electrum from 4.5.4 to 4.5.5, installation was successfull.
Finally the command type -a electrum showed 3 scripts:
$ type -a electrum
electrum és /home/jordi/.local/bin/electrum
electrum és /usr/bin/electrum
electrum és /bin/electrum
The first one gives the error, second and third are links to /opt/electrum/bin/electrum , which works fine.
Renaming the first one did the trick.
Hope this helps someone, Jordi