Post
Topic
Board Electrum
Merits 1 from 1 user
Re: Electrum 3.3.2: SyntaxError: invalid syntax
by
tUnes3
on 26/12/2018, 15:45:47 UTC
⭐ Merited by o_e_l_e_o (1)

One of the things I've seen is that "The minimum python version was increased to 3.6" in Electrum 3.3.0.
Maybe I'm completely wrong, since I'm far from best with Linux, but this is what I'd start with when checking.




That's not what it means. It means the python interpreter he has does not think the code is correct. That's because he's using an older version of python as NeuroticFish pointed out above. He needs to update to python 3.6 or stick with electrum 3.2.3.

This is how I built Python 3.7.2 from source on Debian Stretch

The steps:

1. Update all system packages first

Code:
sudo apt-get update && sudo apt-get upgrade
2. Install the required build tools for Python 3.7.2

Code:
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev
sudo apt-get install -y libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm
sudo apt-get install -y libncurses5-dev  libncursesw5-dev xz-utils tk-dev
3. Download the latest version 3.7.2 source file and its SIG file using wget

Code:
wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz
wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz.asc

4. Verify the authenticity of the source file

Code:
gpg -v Python-3.7.2.tgz.asc

5. Unpack the source file

Code:
tar xvf Python-3.7.2.tgz

6. Enter the Python-3.7.2 directory and run ‘./configure’ to prepare the build

Code:
cd Python-3.7.2
./configure --enable-optimizations

7. Run the following command to build Python 3.7.2

Code:
make -j 8

8. Run the following command to install Python 3.7.2

Code:
sudo make altinstall

9. Reboot the machine

After installing Python 3.7.2, below are the steps that I took to run Electrum 3.3.2:

9. Go to the folder where the downloaded file Electrum-3.3.2.tar.gz is

10. Unpack the gzipped file

11. Go to the directory where run_electrum is located

12. Type python3.7 run_electrum in a terminal

13. The following error appears:

Code:
Error: Could not import PyQt5 on Linux systems, you may try 'sudo apt-get install python3-pyqt5'
/usr/local/lib/python3.7/asyncio/events.py:88: RuntimeWarning: coroutine 'ignore_exceptions..wrapper' was never awaited
  self._context.run(self._callback, *self._args)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

14. I went back to Step 8 and instead of altinstall, I typed the command:

Code:
sudo make install

and rebooted the machine. This time Python3.7 is the default on my Debian Stretch

15. I typed the command python3.7 run_electrum and the same error message appeared:

Code:
Error: Could not import PyQt5 on Linux systems, you may try 'sudo apt-get install python3-pyqt5'
/usr/local/lib/python3.7/asyncio/events.py:88: RuntimeWarning: coroutine 'ignore_exceptions..wrapper' was never awaited
  self._context.run(self._callback, *self._args)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

Please note that python3-pyqt5 has already been installed when I was using version 3.2.3

Thomas (developer): If you are reading this post, could you help me out please?

By the way, season's greetings to all of the folks here.