Artemis executable ...
 
Notifications
Clear all

Artemis executable won't run on Raspberry Pi 3B+ (Buster)  

  RSS

WheezyE
(@wheezye)
Active Member
Joined: 8 months ago
Posts: 9
08/02/2020 12:12 am  

Hi, I'm trying to install Artemis for the first time, but can't get it to run on my Raspberry Pi 3B+.  Both executables I've tried just don't do anything after I double-click them.

Pre-requisites:
I'm running Raspberry Pi 3B+ with Raspbian GNU/Linux 10 (Buster).  I used KM4ACK's build-a-pi scripts to install a bunch of ham radio software and Python 2.7.  I installed Python 3.7.3 and pyinstaller (I tried to take notes on my steps here).  After I installed Python 3.7, I changed the system's priorities for python versions to be 3.7 instead of 2.7 (using "$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.7 2" and "sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1") and made sure Python 3.7 was running by typing "$ python".   I also checked to make sure my GLIBC was up to date with "$ sudo apt-get install libc6".

Compiling from git source:
I compiled from the git (see above link for steps).  (I should also admit that I tried unsuccessfully to compile Artemis once with Python 2.7 before doing any of the pre-requisite installing of Python 3.7 and pyinstaller for pip3.7).  Running the compiled executable in the terminal gave me the following error: 

Traceback (most recent call last):
File "artemis.py", line 9, in <module>
ModuleNotFoundError: No module named 'pandas'
[7538] Failed to execute script artemis

Downloading the pre-compiled Linux binary (link):
I downloaded the binary to the Pi from the Pi's browser, ran "$ chmod u+x create_shortcut.sh" "$ create_shortcut.sh" from the command line to install the program icon.

 

Thank you for reading all this! Also, awesome project.  I'm really excited for auto-correlation.  I think this offline signal recognition manual will be a great addition to the portable digital ham radio community who are building Digital Modem Pi's based on OH8STN and KM4ACK's youtube channels/work. 


Quote
MarcoDT
(@marcodt)
Member Admin
Joined: 2 years ago
Posts: 55
08/02/2020 5:56 pm  

Hi WheezyE, thank you! We are always happy to hear people that appreciate our work!

Back to your issue: it's a bizarre situation when the binary starts but without doing nothing. Can you launch the binary from the console? In this way, you are forcing Artemis to output any possible problem and log into the terminal. The problem that you encounter during the source code compilation is much less mysterious: probably, you forget to install all the required libraries and dependencies. To overcome this issue, open a terminal in the requirements folder and launch the command:

 

pip install -r  requirements.txt --user

then try the compilation again via pyinstaller


ReplyQuote
WheezyE
(@wheezye)
Active Member
Joined: 8 months ago
Posts: 9
09/02/2020 11:30 pm  

Thank you.  I was unaware of the requirements folder until now!  I believe that running the pre-compiled Artemis executable from the command-line results in no text at all and just a black command line window that closes immediately, but I'll double-check that soon and report in.

I couldn't compile the Artemis file on the Raspberry Pi 3B+ running Raspbian Buster, but I discovered in the process that Qt5 may not come with Raspbian by default.  Below is the progress I made today: 

1. After running "python3 -m pip install -r requirements.txt --user", I found that I got errors trying to install numpy, pandas, and PyQt5.  A forum suggested this might be an error on the Raspberry Pi after trying to installed python3.7 from source (which I had previously done: wget  https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz ).

2. I uninstalled and reinstalled python 3.7 and pip from apt-get (instead of from source) through the black magic of some various commands below.

sudo apt-get update -y
sudo apt-get install libatlas-base-dev
sudo apt-get remove python3.7
sudo apt-get install python3.7
sudo apt install python3-pip
sudo python3 -m pip install --upgrade pip setuptools wheel
sudo python3 -m pip install -U setuptools --user
sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y
pip3.7 install pyinstaller

3. I then was able to install numpy and pandas from the requirements file in the Artemis source's requirements folder (via "python3 -m pip install -r requirements.txt --user" ), but still got errors when trying to install PyQt5.

4. I got stuck here trying to install PyQt5: The PyQt5 install version specified by Artemis's requirements.txt is an old PyQt5 version, so no download link could be found during the "... pip install -r requirements.txt".  But it seems that PyQt5 v5.14.1 ("pip install PyQt5")has some known bugs on installation.  Trying to install the previous version of PyQt5 ( "sudo python3 -m pip install pyqt5==5.14 pyqtchart==5.14" ) also error'd (in a way that looked like setuptools was out of date -- but we just upgraded it).  Installing PyQt5.sip and sip ( "pip3 install PyQt5.sip" and "pip3 install sip" ) didn't help either.  I then tried to compile the specific version Artemis wanted by downloading it and trying to compile/make it.  It was at this step that the command line told me that Qt3 was installed on Raspbian, but not Qt5, so that PyQt5 could not compile.  I tried to install Qt5 "sudo apt-get install qt5-default" but still could not get PyQt5 to compile after that.

It was then that I rebooted and discovered all my desktop icons were gone and that my background was black, so I re-freshed my Raspberry Pi from an old backup SD card.

 


ReplyQuote
WheezyE
(@wheezye)
Active Member
Joined: 8 months ago
Posts: 9
28/02/2020 11:25 pm  

I had some time to take another stab at this today and got closer I think, but still having troubles.

I'm running Raspberry Pi 3B+, Raspbian Buster.

I'm also new to Linux, is there a way to have the computer install all the missing dependencies automatically after it identifies them and before re-compiling?

-------------------

 
I get the following when trying to run the downloaded Artemis file:

pi@raspberrypi:~/Downloads/artemis $ ./Artemis 
bash: ./Artemis: cannot execute binary file: Exec format error
pi@raspberrypi:~/Downloads/artemis $ sudo ./Artemis
./Artemis: 1: ./Artemis: Syntax error: "(" unexpected
pi@raspberrypi:~/Downloads/artemis $ sudo ./_ArtemisUpdater
./_ArtemisUpdater: 1: ./_ArtemisUpdater: Syntax error: "(" unexpected

Trying to run the files from Raspbian by double-clicking on them results in nothing.  Double-clicking on them and running from command-line gives no output.

 

And I get the following if I try to compile from source (the warnings log file after compile is 140+ lines of warnings with a lot of "top-level" ones):

pi@raspberrypi:~/Downloads/artemis $ cd ..
pi@raspberrypi:~/Downloads $ sudo ./Artemisbuild
pygame 1.9.4.post1
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "artemis.py", line 32, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "/usr/local/lib/python3.7/dist-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.__dict__)
File "download_window.py", line 11, in <module>
File "PyQt5/uic/__init__.py", line 198, in loadUiType
File "PyQt5/uic/Compiler/compiler.py", line 110, in compileUi
File "PyQt5/uic/uiparser.py", line 1013, in parse
File "xml/etree/ElementTree.py", line 1197, in parse
File "xml/etree/ElementTree.py", line 587, in parse
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEI3OZsdV/download_db_window.ui'
[5969] Failed to execute script artemis

 

----------------

I've redone and refined my installation steps (but it was still a bit of a haphazard mess collecting these commands through trial/error, so some of these steps below may be out of order).  As a plus, since I'm not uninstalling python anymore (like my above steps) Raspbian doesn't get bricked when I run these steps.

Method 1: Download and run
wget  https://aresvalley.com/download/193/Artemis_3.2.0.tar.gz  ~/Downloads/
tar -xzf Artemis_3.2.0.tar.gz
chmod u+x create_shortcut.sh ./create_shortcut.sh   Method 2: Build and run sudo apt-get update -y sudo apt-get install python3.7 python3-pip libatlas-base-dev -y export PATH="/root/.local/bin:$PATH" sudo python3.7 -m pip install --upgrade pip setuptools wheel --user sudo python3.7 -m pip install pyinstaller sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y

#Before installing modules and dependencies, it may be necessary to downgrade "setuptools", especially for PyQt5 installation. sudo python3.7 -m pip install --upgrade 'setuptools<45.0.0' --user cd ~/Downloads git clone https://github.com/AresValley/Artemis.git sudo python3.7 -m pip install -r ~/Downloads/Artemis/requirements/requirements.txt --user sudo python3.7 -m pip install PyQt5 --user sudo python3.7 -m pip install PyQt5.sip --user sudo python3.7 -m pip install pandas --user sudo python3.7 -m pip install qtawesome --user sudo python3.7 -m pip install aiohttp --user   sudo pyinstaller ~/Downloads/Artemis/spec_files/Linux/Artemis.spec #sudo python3.7 -m PyInstaller ~/Downloads/Artemis/spec_files/Linux/Artemis.spec
 

ReplyQuote
WheezyE
(@wheezye)
Active Member
Joined: 8 months ago
Posts: 9
28/02/2020 11:42 pm  

Edit: I just realized 1. that PyQt5 still never installed correctly 2. that installing all the modules by hand should have been the same thing as running "sudo python3.7 -m pip install -r ~/Downloads/Artemis/requirements/requirements.txt --user" (except that I for some reason did need to run those by hand to get them to install - maybe to latest versions... since the requirements.txt specifies certain version numbers) and 3. that I may not need to downgrade setuptools (since PyQt5 still doesn't install with the downgraded version).

In summary, I'll keep trying to get PyQt5 to build and report in again another day maybe.

 


ReplyQuote
WheezyE
(@wheezye)
Active Member
Joined: 8 months ago
Posts: 9
01/03/2020 2:53 am  

And another update:

I remember now that I downgraded setuptools to 44.0.0 to avoid this error message (which happens after compiling and trying to run Artemis):

Traceback (most recent call last):
  File "PyInstaller/loader/rthooks/pyi_rth_pkgres.py", line 13, in <module>
  File "/usr/local/lib/python3.7/dist-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
    exec(bytecode, module.__dict__)
  File "pkg_resources/__init__.py", line 86, in <module>
ModuleNotFoundError: No module named 'pkg_resources.py2_warn'
[10952] Failed to execute script pyi_rth_pkgres

# https://github.com/pypa/setuptools/issues/1963 

After downgrading setuptools, I get the same error message as above:

pi@raspberrypi:~/Downloads/dist $ ./Artemis 
pygame 1.9.4.post1
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "artemis.py", line 32, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "/usr/local/lib/python3.7/dist-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.__dict__)
File "download_window.py", line 11, in <module>
File "PyQt5/uic/__init__.py", line 198, in loadUiType
File "PyQt5/uic/Compiler/compiler.py", line 110, in compileUi
File "PyQt5/uic/uiparser.py", line 1013, in parse
File "xml/etree/ElementTree.py", line 1197, in parse
File "xml/etree/ElementTree.py", line 587, in parse
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEI3OZsdV/download_db_window.ui'
[5969] Failed to execute script artemis

Also, PyQt5 didn't install under pip, but seems like it was already installed ok when I ran the following commands (below). 

sudo apt dist-upgrade
sudo apt install qt5-default pyqt5-dev pyqt5-dev-tools
sudo python3.7 -m pip install --upgrade 'setuptools==44.0.0' --user
sudo pyinstaller ~/Downloads/Artemis/spec_files/Linux/Artemis.spec


So anyway, I'm throwing in the towel on this one for now. I hope Artemis can run on Raspbian some day in the future.

ReplyQuote
WheezyE
(@wheezye)
Active Member
Joined: 8 months ago
Posts: 9
07/03/2020 4:24 pm  

I'm so close!  The compiling problem was with pyinstaller being too old (the repo version of 4.4 doesn't work, but building a dev version from git does work).  After building pyinstaller from source, I finally got Artemis to compile (see steps below).  My compiled Artemis executable now runs either by double-clicking on it or from commandline.

I am getting errors now though:
1. I can't update the program's database (when I try, it downloads for a while and then stops), and no audio files or data is viewable from Artemis.
2. Artemis throws some errors before running from commandline:

pi@raspberrypi:~/Downloads/Artemis/dist/dist/dist $ ./Artemis
pygame 1.9.4.post1
Hello from the pygame community. https://www.pygame.org/contribute.html
libEGL warning: DRI2: failed to authenticate
qt5ct: using qt5ct plugin

(Artemis:14923): Gtk-WARNING **: 08:16:06.133: Unable to locate theme engine in module_path: "pixmap",

(Artemis:14923): Gtk-WARNING **: 08:16:06.138: Unable to locate theme engine in module_path: "pixmap",

(Artemis:14923): Gtk-WARNING **: 08:16:06.140: Unable to locate theme engine in module_path: "pixmap",

(Artemis:14923): Gtk-WARNING **: 08:16:06.141: Unable to locate theme engine in module_path: "pixmap",

(Artemis:14923): Gtk-WARNING **: 08:16:06.142: Unable to locate theme engine in module_path: "pixmap",

(Artemis:14923): Gtk-WARNING **: 08:16:06.143: Unable to locate theme engine in module_path: "pixmap",

(Artemis:14923): Gtk-WARNING **: 08:16:06.144: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.145: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.145: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.146: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.147: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.147: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.148: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.149: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.149: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.150: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.153: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.155: Unable to locate theme engine in module_path: "pixflat",
qt5ct: D-Bus global menu: no

 

 

I used roughly the below steps to compile (some may be redundant or dumb, but I'm new to Linux):

#Update and install things for the Raspberry Pi
sudo apt-get update -y sudo apt-get install python3.7 python3-pip libatlas-base-dev -y export PATH="/root/.local/bin:$PATH" sudo python3.7 -m pip install --upgrade pip setuptools wheel --user
sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y


#Build PyInstaller from source
cd ~/Downloads
git clone https://github.com/pyinstaller/pyinstaller.git
cd pyinstaller
cd bootloader
sudo python3.7 ./waf distclean all
sudo python3.7 setup.py install

#Clone Artemis from git and ensure requirements are installed (twice) cd ~/Downloads git clone https://github.com/AresValley/Artemis.git sudo python3.7 -m pip install -r ~/Downloads/Artemis/requirements/requirements.txt --user sudo python3.7 -m pip install PyQt5 --user sudo python3.7 -m pip install PyQt5.sip --user sudo python3.7 -m pip install pandas --user sudo python3.7 -m pip install qtawesome --user sudo python3.7 -m pip install aiohttp --user

#Compile Artemis
sudo pyinstaller ~/Downloads/Artemis/spec_files/Linux/Artemis.spec

#Run Artemis
cd dist
./Artemis

ReplyQuote
MarcoDT
(@marcodt)
Member Admin
Joined: 2 years ago
Posts: 55
21/03/2020 11:26 am  

First of all, thanks for keeping track of your trials. I'll try to give you some suggestion but I cannot be super helpful since I have no Raspberry Pi 3B+ to try: you are basically a pioneer. From a technical point of view I see no reason why it shouldn't work...

Posted by: @wheezye

Thank you.  I was unaware of the requirements folder until now!  I believe that running the pre-compiled Artemis executable from the command-line results in no text at all and just a black command line window that closes immediately, but I'll double-check that soon and report in.

I couldn't compile the Artemis file on the Raspberry Pi 3B+ running Raspbian Buster, but I discovered in the process that Qt5 may not come with Raspbian by default.  Below is the progress I made today: 

1. After running "python3 -m pip install -r requirements.txt --user", I found that I got errors trying to install numpy, pandas, and PyQt5.  A forum suggested this might be an error on the Raspberry Pi after trying to installed python3.7 from source (which I had previously done: wget  https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz ).

2. I uninstalled and reinstalled python 3.7 and pip from apt-get (instead of from source) through the black magic of some various commands below.

sudo apt-get update -y
sudo apt-get install libatlas-base-dev
sudo apt-get remove python3.7
sudo apt-get install python3.7
sudo apt install python3-pip
sudo python3 -m pip install --upgrade pip setuptools wheel
sudo python3 -m pip install -U setuptools --user
sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y
pip3.7 install pyinstaller

3. I then was able to install numpy and pandas from the requirements file in the Artemis source's requirements folder (via "python3 -m pip install -r requirements.txt --user" ), but still got errors when trying to install PyQt5.

4. I got stuck here trying to install PyQt5: The PyQt5 install version specified by Artemis's requirements.txt is an old PyQt5 version, so no download link could be found during the "... pip install -r requirements.txt".  But it seems that PyQt5 v5.14.1 ("pip install PyQt5")has some known bugs on installation.  Trying to install the previous version of PyQt5 ( "sudo python3 -m pip install pyqt5==5.14 pyqtchart==5.14" ) also error'd (in a way that looked like setuptools was out of date -- but we just upgraded it).  Installing PyQt5.sip and sip ( "pip3 install PyQt5.sip" and "pip3 install sip" ) didn't help either.  I then tried to compile the specific version Artemis wanted by downloading it and trying to compile/make it.  It was at this step that the command line told me that Qt3 was installed on Raspbian, but not Qt5, so that PyQt5 could not compile.  I tried to install Qt5 "sudo apt-get install qt5-default" but still could not get PyQt5 to compile after that.

It was then that I rebooted and discovered all my desktop icons were gone and that my background was black, so I re-freshed my Raspberry Pi from an old backup SD card.

Thanks, yes we were a little bit unclear in the documentation. Thanks for pointing out this lack of information. Ok, it seems that some libraries are not available from the default repositories and this could be a problem since you need (at least) the version reported in the requirements.txt. You have already discovered that uninstalling python is not a good idea because this is a system dependency on Linux systems...the strange thing is that you have uninstalled python 3 so it shouldn't be a problem in theory but I wouldn't bet on it. I don't know what went wrong...

Posted by: @wheezye

I had some time to take another stab at this today and got closer I think, but still having troubles.

I'm running Raspberry Pi 3B+, Raspbian Buster.

I'm also new to Linux, is there a way to have the computer install all the missing dependencies automatically after it identifies them and before re-compiling?

-------------------

 
I get the following when trying to run the downloaded Artemis file:

pi@raspberrypi:~/Downloads/artemis $ ./Artemis 
bash: ./Artemis: cannot execute binary file: Exec format error
pi@raspberrypi:~/Downloads/artemis $ sudo ./Artemis
./Artemis: 1: ./Artemis: Syntax error: "(" unexpected
pi@raspberrypi:~/Downloads/artemis $ sudo ./_ArtemisUpdater
./_ArtemisUpdater: 1: ./_ArtemisUpdater: Syntax error: "(" unexpected

Trying to run the files from Raspbian by double-clicking on them results in nothing.  Double-clicking on them and running from command-line gives no output.

 

And I get the following if I try to compile from source (the warnings log file after compile is 140+ lines of warnings with a lot of "top-level" ones):

pi@raspberrypi:~/Downloads/artemis $ cd ..
pi@raspberrypi:~/Downloads $ sudo ./Artemisbuild
pygame 1.9.4.post1
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
File "artemis.py", line 32, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "/usr/local/lib/python3.7/dist-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.__dict__)
File "download_window.py", line 11, in <module>
File "PyQt5/uic/__init__.py", line 198, in loadUiType
File "PyQt5/uic/Compiler/compiler.py", line 110, in compileUi
File "PyQt5/uic/uiparser.py", line 1013, in parse
File "xml/etree/ElementTree.py", line 1197, in parse
File "xml/etree/ElementTree.py", line 587, in parse
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEI3OZsdV/download_db_window.ui'
[5969] Failed to execute script artemis

 

----------------

I've redone and refined my installation steps (but it was still a bit of a haphazard mess collecting these commands through trial/error, so some of these steps below may be out of order).  As a plus, since I'm not uninstalling python anymore (like my above steps) Raspbian doesn't get bricked when I run these steps.

Method 1: Download and run
wget   https://aresvalley.com/download/193/Artemis_3.2.0.tar.gz   ~/Downloads/
tar -xzf Artemis_3.2.0.tar.gz
chmod u+x create_shortcut.sh ./create_shortcut.sh   Method 2: Build and run sudo apt-get update -y sudo apt-get install python3.7 python3-pip libatlas-base-dev -y export PATH="/root/.local/bin:$PATH" sudo python3.7 -m pip install --upgrade pip setuptools wheel --user sudo python3.7 -m pip install pyinstaller sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y

#Before installing modules and dependencies, it may be necessary to downgrade "setuptools", especially for PyQt5 installation. sudo python3.7 -m pip install --upgrade 'setuptools<45.0.0' --user cd ~/Downloads git clone https://github.com/AresValley/Artemis.git sudo python3.7 -m pip install -r ~/Downloads/Artemis/requirements/requirements.txt --user sudo python3.7 -m pip install PyQt5 --user sudo python3.7 -m pip install PyQt5.sip --user sudo python3.7 -m pip install pandas --user sudo python3.7 -m pip install qtawesome --user sudo python3.7 -m pip install aiohttp --user   sudo pyinstaller ~/Downloads/Artemis/spec_files/Linux/Artemis.spec #sudo python3.7 -m PyInstaller ~/Downloads/Artemis/spec_files/Linux/Artemis.spec
 

Yes, with this command:

sudo python3.7 -m pip install -r ~/Downloads/Artemis/requirements/requirements.txt --user

you are correctly requesting to identify the available libraries and download the missing ones. You must pay attention to possible error (missing library for your device, corrupted instllation, etc.), of course. 

Posted by: @wheezye

Edit: I just realized 1. that PyQt5 still never installed correctly 2. that installing all the modules by hand should have been the same thing as running "sudo python3.7 -m pip install -r ~/Downloads/Artemis/requirements/requirements.txt --user" (except that I for some reason did need to run those by hand to get them to install - maybe to latest versions... since the requirements.txt specifies certain version numbers) and 3. that I may not need to downgrade setuptools (since PyQt5 still doesn't install with the downgraded version).

In summary, I'll keep trying to get PyQt5 to build and report in again another day maybe.

Yes, PyQt5 is a strong dependency for Artemis because the entire GUI is based on it. PyQt5 is not new and so should be normally available in the standard repository for almost every Linux system. It's also present on PyPI.

Posted by: @wheezye

I'm so close!  The compiling problem was with pyinstaller being too old (the repo version of 4.4 doesn't work, but building a dev version from git does work).  After building pyinstaller from source, I finally got Artemis to compile (see steps below).  My compiled Artemis executable now runs either by double-clicking on it or from commandline.

I am getting errors now though:
1. I can't update the program's database (when I try, it downloads for a while and then stops), and no audio files or data is viewable from Artemis.
2. Artemis throws some errors before running from commandline:

pi@raspberrypi:~/Downloads/Artemis/dist/dist/dist $ ./Artemis
pygame 1.9.4.post1
Hello from the pygame community. https://www.pygame.org/contribute.html
libEGL warning: DRI2: failed to authenticate
qt5ct: using qt5ct plugin

(Artemis:14923): Gtk-WARNING **: 08:16:06.133: Unable to locate theme engine in module_path: "pixmap",

(Artemis:14923): Gtk-WARNING **: 08:16:06.138: Unable to locate theme engine in module_path: "pixmap",

(Artemis:14923): Gtk-WARNING **: 08:16:06.140: Unable to locate theme engine in module_path: "pixmap",

(Artemis:14923): Gtk-WARNING **: 08:16:06.141: Unable to locate theme engine in module_path: "pixmap",

(Artemis:14923): Gtk-WARNING **: 08:16:06.142: Unable to locate theme engine in module_path: "pixmap",

(Artemis:14923): Gtk-WARNING **: 08:16:06.143: Unable to locate theme engine in module_path: "pixmap",

(Artemis:14923): Gtk-WARNING **: 08:16:06.144: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.145: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.145: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.146: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.147: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.147: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.148: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.149: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.149: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.150: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.153: Unable to locate theme engine in module_path: "pixflat",

(Artemis:14923): Gtk-WARNING **: 08:16:06.155: Unable to locate theme engine in module_path: "pixflat",
qt5ct: D-Bus global menu: no

 

 

I used roughly the below steps to compile (some may be redundant or dumb, but I'm new to Linux):

#Update and install things for the Raspberry Pi
sudo apt-get update -y sudo apt-get install python3.7 python3-pip libatlas-base-dev -y export PATH="/root/.local/bin:$PATH" sudo python3.7 -m pip install --upgrade pip setuptools wheel --user
sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y


#Build PyInstaller from source
cd ~/Downloads
git clone https://github.com/pyinstaller/pyinstaller.git
cd pyinstaller
cd bootloader
sudo python3.7 ./waf distclean all
sudo python3.7 setup.py install

#Clone Artemis from git and ensure requirements are installed (twice) cd ~/Downloads git clone https://github.com/AresValley/Artemis.git sudo python3.7 -m pip install -r ~/Downloads/Artemis/requirements/requirements.txt --user sudo python3.7 -m pip install PyQt5 --user sudo python3.7 -m pip install PyQt5.sip --user sudo python3.7 -m pip install pandas --user sudo python3.7 -m pip install qtawesome --user sudo python3.7 -m pip install aiohttp --user

#Compile Artemis
sudo pyinstaller ~/Downloads/Artemis/spec_files/Linux/Artemis.spec

#Run Artemis
cd dist
./Artemis

Awesome! Your error on the command line is not critical and it's not related to the download problems that you reported just above. Good news is that the download manager seems to work but it gets stuck in the middle of the process...the only reason that I have in mind could be some connection issue: if the connection is too slow (a warning should appear like 'slow connection') Artemis could have some problems in updating the DB. If it is not related to your Rasp device or system, some errors should pop up in the console. Did you notice something strange just after the last "pixflat" error after trying to update the DB?


ReplyQuote
WheezyE
(@wheezye)
Active Member
Joined: 8 months ago
Posts: 9
08/04/2020 8:48 pm  

I've finally ironed out all the wrinkles with my build process and built a 97.1MB Artemis EXE that works on the Pi3B+ and Pi4B.  I can download the database, audio files, and use themes.  I've pasted the bash code for the build at the bottom of this post.  In the process of streamlining these build instructions, I also learned a lot about what exactly was causing certain error messages and how to fix them, so I've included those error messages and fixes in the bash code comments in case anyone encounters those errors in the future.

I'm still a Linux noob, but I've learned a lot about Linux, Raspbian, Python, and pyinstaller, and would also like to revise all of my previous posts.

Posted by: @marcodt

First of all, thanks for keeping track of your trials. I'll try to give you some suggestion but I cannot be super helpful since I have no Raspberry Pi 3B+ to try: you are basically a pioneer. From a technical point of view I see no reason why it shouldn't work...

Thank you for all your helpful tips and the cheering-on along the way.  Your enthusiasm helped me to learn more about streamlining my process - that and the fact that after I posted my last set of install steps, I found that I couldn't reproduce a build from my own steps on a fresh Pi installation for some reason (I realized I missed some steps!).

Posted by: @marcodt
Posted by: @wheezye

It was at this step that the command line told me that Qt3 was installed on Raspbian, but not Qt5, so that PyQt5 could not compile.  I tried to install Qt5 "sudo apt-get install qt5-default" but still could not get PyQt5 to compile after that.

It was then that I rebooted and discovered all my desktop icons were gone and that my background was black, so I re-freshed my Raspberry Pi from an old backup SD card.

Thanks, yes we were a little bit unclear in the documentation. Thanks for pointing out this lack of information. Ok, it seems that some libraries are not available from the default repositories and this could be a problem since you need (at least) the version reported in the requirements.txt. You have already discovered that uninstalling python is not a good idea because this is a system dependency on Linux systems...the strange thing is that you have uninstalled python 3 so it shouldn't be a problem in theory but I wouldn't bet on it. I don't know what went wrong...

The fact that the pip repo for Raspbian didn't have PyQt5 5.12.1 (as requested by the requirements.txt file) turned out to also be the reason that the requirements.txt file appeared to be doing nothing and why none of the pip modules requested in requirements.txt were getting installed:  When attempting to run pip install -r ~/Downloads/Artemis/requirements/requirements.txt --user the file would download the modules, but error on the last module, PyQt5, and seem to install no modules at all.

Also, I was wrong about Qt5 not being installed on the Pi.  It turns out that Raspbian does include Qt5 installed by default.  I think I was getting Qt5 confused with PyQt5.

Through this build process, I learned a ton about Linux (Raspbian specifically).  It turns out Raspbian Buster does use Python 3 (v 3.7.3) as part of its operating system (although it wouldn't surprise me if other Linux distros used Python 2 instead of Python 3 as their operating system dependency).  Uninstalling Python 3 on Raspbian breaks Raspbian, and reinstalling a fresh Python 3 doesn't fix what's broken.  It turns out, Raspbian's installation of Python 3 is referred to as "System python" since it is the Python installation Raspbian uses to function.  This also was a key realization to why my previous Artemis EXE's were building at about 500MB file sizes - since Artemis was copying into its EXE all of the pip modules that the operating system used to function.  This also explained why when I ran sudo pip commands (installing into System python), things sometimes behaved differently than if I ran pip commands (without sudo), and why I had trouble installing other Python versions (python would seem to pretend like it didn't know I had installed a different python version).  This was a giant stress mess for me until I discovered Pyenv and virtualenv to cleanly install a fresh Python 3 that was completely independent of System python with its own pip modules (and no system pip modules).

So, after all that... here is the process I cooked up to get Artemis 3 working on the Pi.  I've built the EXE on a Pi3B+ and tested it on Pi3B+ and Pi4B with no issues.  Even though my built EXE's work, the official Artemis 3 Linux exe's still don't work for me though.  I'm wondering if this may be something to do with the Pi's ARM processor.

 

 Bash code to be entered into the Linux Terminal:

### Build Artemis 3.2.0 from source for Raspberry Pi 3B+ and 4B (Raspbian Buster)
# by KI7POL
# April 8, 2020
#
# Artemis ( https://aresvalley.com/)  is an identification guidebook for radio signals which displays pictures of a waterfall display of the signal (like you would see in an SDR receiver, a ham radio panadapter/bandscope, or fldigi or other ham radio digital mode software) and an audio file of what the radio signal sounds like.  Think of Artemis like a birding guide that shows a picture of a bird alongside an audio file of its bird call.  This software would be useful to radio amateurs ("Ham radio operators") who wish to identify interference or wish to know which decoder software to use to decode any digital signals they hear.
#
# The official Linux distribution of Artemis does not run on Raspberry Pi 3B+. Therefore we will custom-build Artemis for the Pi using the steps below.
#
# This process takes about 2.5 hours and about 916.8 MB of storage space (size on disk: PyEnv 411.5 MB, 122.1 MB Environment folder with downloads, 143.7 MB Artemis dist folder after compile, 155.3 MB Build folder after compile, 84.2 MB Data folder after downloading the Artemis database)
# It produces an Artemis 227.5 MB folder which contains two EXE files (Artemis 97.1 MB, and _ArtemisUpdater 46.1 MB), theme files, audio files, and a database file.  The Artemis folder can be copied to other Raspberry Pi's and run completely self-contained, so that the compiled files can be distributed.  The Raspberry Pi's receiving the EXE files will not need to install Artemis dependencies to run the compiled EXE's.
# In the process of building, we will install pyenv, install some system packages, and add some lines to .bashrc.  Pip modules will be installed into pyenv under a Python 3.7.0 environment apart from system Python.
#
# Note! You will have to copy paste some values into bashrc yourself by hand.  My username is pi, but you would need to change line 46 of these instructions to have your username in "export PATH="/home/pi/.pyenv/bin:$PATH"" instead of pi.
#
# See the Ares Valley / Artemis forums for more information or trouble-shooting.
#
# Pro tip: In terminal, you can use CTRL-x CTRL-e to use bash's edit-and-execute-command to paste all the commands you want to run into your text editor. Once you save and quit the command(s) saved by the editor will be executed.  However, the "sudo nano ~/.bashrc" command and both "exec "$SHELL"" commands will halt and disrupt the edit-and-execute-command so that you have to paste commands in again (I'm not sure how to get around this).


######################################### Prepare a Clean Build Environment #########################################

export PATH="/root/.local/bin:$PATH" # pip modules will recommend this later

sudo apt-get update -y
sudo apt-get upgrade -y
###This package is required to prevent numpy from throwing errors during Artemis compile "libf77blas.so.3: cannot open shared object file: No such file or directory"
sudo apt-get install libatlas-base-dev -y

###Try updating GLIBC if you get errors
#sudo apt-get install libc6
###Try these Qt5 packages if you get errors
#sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools -y

###Install pyenv so we can build Artemis outside of system Python to do our best to avoid errors  https://realpython.com/intro-to-pyenv/ 

###We will install our Artemis requirements pip modules inside of this virtualenv.  If we installed our pip modules inside of system python, we would end up with a final Artemis file that was 1.3GB and which would error when trying to copy itself from build/PKG-00.pkg into its final dist/Artemis EXE, with error message "raise SystemError("objcopy Failure: %s" % stderr)  SystemError: objcopy Failure:  objcopy: out of memory allocating 536870912 bytes after a total of 0 bytes".  However, since we're building a fresh Python environment to install ONLY our needed Artemis modules inside of, we will not get this error and we will build an Artemis EXE that is about 97.1 MB.

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \
libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl

curl  https://pyenv.run  | bash

### Add in the following three lines to the bottom of the bashrc file to properly install pyenv
sudo nano ~/.bashrc
export PATH="/home/pi/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
### Now press CTRL-X, Y, Enter
exec "$SHELL"

pyenv install -v 3.7.0 # Install Python 3.7.0 separate from your system's main Python installation
pyenv global 3.7.0 # Make your new non-system installation of python 3.7.0 whenever "python" is typed
#python -V # You can test which version of python has priority now on your system if you like
#python -m test # You can run python diagnostics if you want to check the integrity of your new python

###Create our new python virtual environment using Python 3.7.0, and activate it for use.
mkdir Environments
cd Environments
mkdir artemis3_py370_pyqt5122
cd artemis3_py370_pyqt5122
pyenv virtualenv 3.7.0 artemis3_py370_pyqt5122
pyenv local artemis3_py370_pyqt5122
#pyenv which python
pyenv activate artemis3_py370_pyqt5122 # This command may be redundant
#python -V


######################################### Install Artemis Requirements #########################################

###Download Artemis sourcecode from Github and install Artemis' build requirements.  Since the pip distro for Raspbian doesn't include PyQt5 5.12.2 as an option, and since PyQt5 5.12.2 is recommended by Artemis requirements.txt, we're going to build PyQt5 5.12.2 from source. PyQt5 requires sip to install.  Since PyQt5 v5.12.2 is from May 6, 2019, I chose to build sip 4.19.17 from the same release day from source to try to reduce any possible errors with PyQt5.  Note that installing PyQt5 takes a little over 2 hours on the Pi3B+.
cd ~/Environments/artemis3_py370_pyqt5122
git clone  https://github.com/AresValley/Artemis.git 

###I'm not sure if this step is needed, but you might try it if you get errors installing newer PyQt5 modules or troubles compiling Artemis like: "ModuleNotFoundError: No module named 'pkg_resources.py2_warn'".  Setuptools for python 3.7.0 is older than 44.0.0 by default though.
#python3.7 -m pip install --upgrade 'setuptools==44.0.0'

###We must install requirements for Artemis ourself by hand since the Raspbian pip distro doesn't include the recommended 5.12.2 version of PyQt5. Therefore, if we try to install requirements using "python3.7 -m pip install -r cd ~/Environments/artemis3_py370_pyqt5122/Artemis/requirements/requirements.txt" we will error on PyQt5 at the end and auto-abort before we get to install ANY of the required pip modules.  Note that we are installing the pip modules specified in requirements.txt by installing them within our non-system Python 3.7.0 installation.  If you try to install these modules using "sudo python3.7" or "sudo python", you will accidentally be installing them into system python and not into our pyenv virtualenv python.
python3.7 -m pip install 'numpy==1.17.2' 'pandas>=0.24.2' 'certifi>=2019.6.16' 'aiohttp>=3.5.4' 'urllib3==1.24.3' 'pygame>=1.9.6' 'QtAwesome>=0.6.0'

cd ~/Environments/artemis3_py370_pyqt5122
wget  https://www.riverbankcomputing.com/static/Downloads/sip/4.19.17/sip-4.19.17.tar.gz 
wget  https://www.riverbankcomputing.com/static/Downloads/PyQt5/5.12.2/PyQt5_gpl-5.12.2.tar.gz 
tar xvfz sip-4.19.17.tar.gz
tar xvfz PyQt5_gpl-5.12.2.tar.gz

cd ~/Environments/artemis3_py370_pyqt5122
cd sip-4.19.17
python3.7 configure.py --sip-module PyQt5.sip
sudo make
sudo make install # Using sudo install here is ok since the previous installation configuration commands aimed the installation at our pyenv python 3.7.0 environment instead of system python.  We should otherwise avoid sudo pip installs though since those would install modules under system python.

cd ~/Environments/artemis3_py370_pyqt5122
cd PyQt5_gpl-5.12.2
python3.7 configure.py --confirm-license --sip-incdir="/home/$USER/Environments/artemis3_py370_pyqt5122/sip-4.19.17/siplib"
sudo make # Configuring and making PyQt5 takes about 2 hours
sudo make install

###If you still get errors, you might try a different PyInstaller version built from source - Either the newest development version, or an older version
#python3.7 -m pip install  https://github.com/pyinstaller/pyinstaller/archive/develop.zip  # Newest pyinstaller version
#python3.7 -m pip install --upgrade 'PyInstaller==3.5' # Older pyinstaller version
python3.7 -m pip install pyinstaller # Raspbian pip repo version of pyinstaller
# Reload shell to avoid the error: "bash: PyInstaller: command not found".  Then after reloading shell, ensure the pyenv environment is also reinitialized by going outside then back inside the environment directory. Sorry this is a little kludgey.
exec "$SHELL"
cd ~/
cd ~/Environments/artemis3_py370_pyqt5122
pyenv activate artemis3_py370_pyqt5122


######################################### Build Artemis #########################################

###NOTE!!! Artemis must be built by running "pyinstaller Artemis.spec" WHILE THE TERMINAL'S WORKING DIRECTORY IS INSIDE THE "/Artemis/spec_files/Linux" folder!  If you try to build the Artemis.spec while not in the working directory (for example, by being inside "~/Downloads/ArtemisTestBuild/" and running "PyInstaller ~/Downloads/Artemis/spec_files/Linux/Artemis.spec", then Artemis will build ok but then crash when trying to run the Artemis EXE: "FileNotFoundError: [Errno 2] No such file or directory: '/tmp/_MEIaHNect/download_db_window.ui'". Said another way, you MUST cd into the "Artemis/spec_files/Linux" directory BEFORE running the "pyinstaller Artemis.spec" command!

###Change working directory to the Artemis/../Linux folder, compile Artemis, give the newly made dist folder write permissions, copy the themes folder into dist, make a folder called Data, clean up by deleting the build folder, then run Artemis.
cd ~/Environments/artemis3_py370_pyqt5122/Artemis/spec_files/Linux/
pyinstaller --clean Artemis.spec
pyinstaller updater.spec
sudo chmod -R 755 dist 
sudo cp -r ~/Environments/artemis3_py370_pyqt5122/Artemis/src/themes dist/themes
sudo cp ~/Environments/artemis3_py370_pyqt5122/Artemis/spec_files/Linux/create_shortcut.sh dist/
sudo cp ~/Environments/artemis3_py370_pyqt5122/Artemis/spec_files/Linux/artemis3.svg dist/
sudo chmod +x create_shortcut.sh
sudo rm -rf build
sudo mv dist ~/Artemis

### Put the system back to the way it was. Still working on this one
pyenv deactivate # This command doesn't work for me, but you can also just close the terminal window
pyenv global system # Set python back to system python. You can check python version with "python -V"

sudo chmod -R 755 ~/Artemis # Artemis needs the inside of its folder to have 755 permissions. The folder itself can have 700 permissions.
cd ~/Artemis

### You can install a desktop shortcut to the Artemis EXE with the "create_shortcut.sh" script if you wish.  The shortcut will be put in the start menu under the "Other" folder.   https://aresvalley.com/documentation/ 
sudo chmod +x create_shortcut.sh
./create_shortcut.sh # Don't run this script as sudo


### Run Artemis from a deskop shortcut, or with the command below.  Follow the on-screen prompts to download the database and audio files.
./Artemis

# If you get this error: "QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'", log out of your Pi then log back in.  This may be a problem with the EXE getting confused by pyenv if pyenv is still active when the EXE is first run.  Pyenv activates automatically by being inside the ~/Environments/artemis3_py370_pyqt5122/ directory.

# Sometimes randomly after downloading the database, the Data folder seems to appear one directory above where Artemis is.  This is strange, but just copy the Data folder into the Artemis folder again and everything should work.

######################################### Notes #########################################

### Other Resources
# Python Virtual Environments  https://www.youtube.com/watch?v=N5vscPTWKOk 
# Python VirtEnv reduces built EXE file sizes  https://stackoverflow.com/questions/47692213/reducing-size-of-pyinstaller-exe 
# Setuptools error: "ModuleNotFoundError: No module named 'pkg_resources.py2_warn'"  https://github.com/pypa/setuptools/issues/1963 
# Trouble-shooting pyinstaller  https://github.com/pyinstaller/pyinstaller/wiki/How-to-Report-Bugs#make-sure-everything-is-packaged-correctly 
# Using pyinstaller with venv:  https://pyinstaller.readthedocs.io/en/stable/development/venv.html 
# Learning Pyenv  https://realpython.com/intro-to-pyenv/ 
 

### Future work
# Consider adding UPX with a pyinstaller command to the UPX directory --upx-dir=..\upx391w -y
#  https://github.com/upx/upx/issues/271 


###My Raspberry Pi 3B+ system specs (Raspbian Buster)
#python3.7 -O -m PyInstaller --clean Artemis.spec

#323 INFO: PyInstaller: 3.5 # Also successfully tested with Pyinstaller 3.6
#323 INFO: Python: 3.7.0
#328 INFO: Platform: Linux-4.19.97-v7+-armv7l-with-debian-10.3
#335 INFO: UPX is not available.


#pip list

#Package         Version   
#--------------- ----------
#aiohttp         3.6.2     
#altgraph        0.17      
#async-timeout   3.0.1     
#attrs           19.3.0    
#certifi         2020.4.5.1
#chardet         3.0.4     
#idna            2.9       
#multidict       4.7.5     
#numpy           1.17.2    
#pandas          1.0.3     
#pip             10.0.1    
#pygame          1.9.6     
#PyInstaller     3.6       
#PyQt5           5.12.2    
#PyQt5-sip       4.19.17   
#python-dateutil 2.8.1     
#pytz            2019.3    
#QtAwesome       0.7.0     
#QtPy            1.9.0     
#setuptools      39.0.1    
#six             1.14.0    
#urllib3         1.24.3    
#yarl            1.4.2



###Terminal output on RPi3B+ for our build
#spec_files/Linux $ dist/./Artemis
#pygame 1.9.6
#Hello from the pygame community.  https://www.pygame.org/contribute.html 
#libEGL warning: DRI2: failed to authenticate
#qt5ct: using qt5ct plugin
#qt5ct: D-Bus global menu: no
#[Artemis then launches]


###Terminal output on RPi4B for our build
#pi@raspberrypi:~/Desktop/Artemis3 Pi3B+ $ ./Artemis 
#pygame 1.9.6
#Hello from the pygame community.  https://www.pygame.org/contribute.html 
#qt5ct: using qt5ct plugin
#qt5ct: D-Bus global menu: no
#[Artemis then launches]


###Terminal output on RPi4B for the official Linux build
#pi@raspberrypi:~/Downloads/artemis $ ./Artemis 
#bash: ./Artemis: cannot execute binary file: Exec format error
#pi@raspberrypi:~/Downloads/artemis $ ./_ArtemisUpdater 
#bash: ./_ArtemisUpdater: cannot execute binary file: Exec format error
#[Artemis doesn't launch]

 

I've also attached uploaded these steps as a text file just in case the code formatting gets messed up.


ReplyQuote
WheezyE
(@wheezye)
Active Member
Joined: 8 months ago
Posts: 9
09/04/2020 5:09 pm  
Posted by: @wheezye

The fact that the pip repo for Raspbian didn't have PyQt5 5.12.1 (as requested by the requirements.txt file)

And by "PyQt5 5.12.1" I mean PyQt5 5.12.2 🙃 


ReplyQuote
MarcoDT
(@marcodt)
Member Admin
Joined: 2 years ago
Posts: 55
09/04/2020 9:17 pm  
Posted by: @wheezye

I've finally ironed out all the wrinkles with my build process and built a 97.1MB Artemis EXE that works on the Pi3B+ and Pi4B.  I can download the database, audio files, and use themes.  I've pasted the bash code for the build at the bottom of this post.  In the process of streamlining these build instructions, I also learned a lot about what exactly was causing certain error messages and how to fix them, so I've included those error messages and fixes in the bash code comments in case anyone encounters those errors in the future.

I'm still a Linux noob, but I've learned a lot about Linux, Raspbian, Python, and pyinstaller, and would also like to revise all of my previous posts.

I'm pleased to hear that, and I'm sorry I couldn't help you more. You have done a really huge and exceptional job on the ARM processor port. I think that learning from trials and errors is the easiest way to understand UNIX based systems (I must admit that I learned the same way, and I'm still learning of course). Maybe it's not the most efficient way but it works... and this is what matters.

Posted by: @wheezye

Thank you for all your helpful tips and the cheering-on along the way.  Your enthusiasm helped me to learn more about streamlining my process - that and the fact that after I posted my last set of install steps, I found that I couldn't reproduce a build from my own steps on a fresh Pi installation for some reason (I realized I missed some steps!).

Don't worry, it was a pleasure (for the very little help I was able to give you)! Actually I have to thank you again for the masterful work you did and I take this opportunity to ask you some things: your super helpful post will remain here as a guide for the newcomers interested in running Artemis on Raspberry but I'd like to make it a little more "official". Your guide is well made and exhaustive (you also tested it), so I thought: would you like to make a pull request on GitHub to upload these instructions in the spec_files/Linux folder ( https://github.com/AresValley/Artemis/tree/master/spec_files/Linux )? Moreover, if you could (and if you want to) provide me the executable for Pi3B+ and Pi4B I will be happy to upload them to the main page of Artemis along with the other distributions! Anyway, if you agree, we'd like to add you to our acknowledgment for the ARM port 🙂

 

This post was modified 6 months ago by MarcoDT

ReplyQuote
WheezyE
(@wheezye)
Active Member
Joined: 8 months ago
Posts: 9
10/04/2020 12:28 am  

Wow, yes.  I would be happy to help any way I can.  You are more than welcome to include my script on the GitHub page if you like or modify it any way you like.  I'll see if I can optimize it a bit more too to be more automatic.  I'll make a pull request soon.

I would love to have AresValley host the Pi binary too.  That would make Artemis easily available for any hams - and available to be added to KM4ACK's "Build a Pi" auto-install script for ham software.  I'll attached a link to my binaries in a GitHub issues tracker post I just made.

Thank you 🙂
Eric Wiessner (KI7POL)


ReplyQuote
MarcoDT
(@marcodt)
Member Admin
Joined: 2 years ago
Posts: 55
13/04/2020 11:15 am  

@wheezye

Perfect, thanks again!

The version of Artemis for raspberry is now on the main page but the download is temporarily suspended in order to update the module for the automatic download (otherwise the system detects Linux as the main OS and not the correct ARM architecture). Moreover, I was able to get my hands on a raspberry 2 so I can use your script to do all the necessary tests. Alessandro has already applied the necessary changes and also fixed the space weather module so in a few days of testing we could release the updated version.


ReplyQuote
Share: