LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Electrum 4.0.2 new version: issue after installing it. (https://www.linuxquestions.org/questions/slackware-14/electrum-4-0-2-new-version-issue-after-installing-it-4175681706/)

4Strings 09-07-2020 03:25 PM

Electrum 4.0.2 new version: issue after installing it.
 
Hi everybody!
I could successfully compile and run the slackbuilds.org Electrum version 3.3.8. Today, I've tried to upgrade to the last available version 4.0.2 not yet on slackbuilds.org.

I could successfully compile and install the new 4.0.2 version, but I can only succesfully run it launching the ./run_electrum script from the source directory:
Code:

fourstrings@darkstar:/tmp/SBo/Electrum-4.0.2$ ./run_electrum
Instead, running the "/usr/bin/electrum" script, one gets the following error message:
Code:

fourstrings@darkstar:~$ /usr/bin/electrum
Traceback (most recent call last):
  File "/usr/bin/electrum", line 84, in <module>
    from electrum.logging import get_logger, configure_logging
  File "/usr/lib/python3.7/site-packages/electrum/__init__.py", line 16, in <module>
    from .wallet import Wallet
  File "/usr/lib/python3.7/site-packages/electrum/wallet.py", line 65, in <module>
    from .storage import StorageEncryptionVersion, WalletStorage
  File "/usr/lib/python3.7/site-packages/electrum/storage.py", line 36, in <module>
    from .wallet_db import WalletDB
  File "/usr/lib/python3.7/site-packages/electrum/wallet_db.py", line 36, in <module>
    from .invoices import PR_TYPE_ONCHAIN, Invoice
  File "/usr/lib/python3.7/site-packages/electrum/invoices.py", line 10, in <module>
    from .lnaddr import lndecode, LnAddr
  File "/usr/lib/python3.7/site-packages/electrum/lnaddr.py", line 11, in <module>
    import bitstring
ModuleNotFoundError: No module named 'bitstring'

If I diff the "run_electrum" script and the "/usr/bin/elecrum" I get:
Code:

fourstrings@darkstar:/tmp/SBo/Electrum-4.0.2$ diff run_electrum /usr/bin/electrum
1c1
< #!/usr/bin/env python3
---
> #!/usr/bin/python3

So I tried to edit the row in /usr/bin/electrum to match the corresponding one in run_electrum.
Despite that I get the same error message!

It isn't a big problem since I can use the new version from the source directory, but my question is: "could that issue be solved easily?".

ponce 09-07-2020 04:47 PM

from the error I guess it needs an additional python3 module, bitstring, that is not yet on SlackBuilds.org: most probably the electrum maintainer will submit a script for it whenever he will update electrum to the new version.

you could also install it using pip3 but it will be surely better to use a SlackBuild and make a package for it: you can ping the electrum maintainer and ask if he feel it's ok to update it (check if everything that depends on it is compatible with the new version, etc.).

4Strings 09-08-2020 11:51 AM

Thank you ponce for your answer. :)
I will try to download and install pip3 and to contact the slackbuilds.org electrum maintainer, as well! :thumbsup:


EDIT:
Quote:

Originally Posted by ponce (Post 6163596)
from the error I guess it needs an additional python3 module, bitstring,.....

Perfect! Thank you! :) It really solves the issue! :hattip:
I've just downloaded and compiled the bitstring module with a simple:
Code:

python3 setup.py install --root=$PKG
Then, I've recompiled and installed electrum again and now it runs without errors!

So, the final conclusion is that "bitstring" is the only missing dependency for the last version of electrum!

crts 09-08-2020 12:01 PM

If installilng untracked packages are a concern then you could try the Appimage that is also offered on the website in the Electrum download section. It is self contained and does not need installation.

4Strings 09-08-2020 12:36 PM

Quote:

Originally Posted by crts (Post 6163830)
If installilng untracked packages are a concern then you could try the Appimage that is also offered on the website in the Electrum download section. It is self contained and does not need installation.

Yes I could notice that. Thank you! :)

I wanted to know how to solve the issue from compiling the sources and, as I wrote editing my previous post, installing "bitstring" works! ;)


All times are GMT -5. The time now is 10:13 AM.