Search code examples
pythonpipx

Apt installed python module not found by pipx installed application


I am running Ubuntu 24.04. I'm attempting to install Electrum as a Python application, which requires the Python3 modules pyqt5 and cryptography.

I checked these modules were available:

sudo apt install python3-pyqt5 python3-cryptography

These both seem to install successfully.

I then install the Electrum tarball with pipx: pipx install Electrum-4.5.8.tar.gz

Upon attempting to run electrum, I receive an error that at least one of {pycryptodomex, cryptography} needs to be installed.

Why hasn't pipx found the installed cryptography module?


Solution

  • pipx applications that are dependent on other modules installed in the system, need to have those modules preinstalled into the pipx virtual environment:

    pipx install --preinstall pyqt5 --preinstall cryptography Electrum-4.5.8.tar.gz