Ok, so, NanoVNA-saver works under Ubuntu, RedHat/RHEL/CentOS, whatever.? Instructions are available, which is nice if they fit your needs.
But I don't use those distros, for a lot of reasons but mainly because of the, "this way might be old-fashioned, but it just works" phenomenon.
When and where I can put up with that nasty kludge known as "systemd," I have been using OpenSuse (currently Leap 42.3) for a long time now.? (Yes, 42.3 is EOL now, and deprecated, but their new version crashes this old laptop almost instantly when I try to install it.)? So, staying with something not-so-cutting-edge gets me hardware compatibility with older systems, like this Panasonic Toughbook CF-30 which I use constantly as my main communication and portable system.? (What Leap 15 does to the touchpad and touchscreen on this old thing shouldn't happen to Sodom and Gomorrah. Yes, it's old, not too speedy, and can't be upgraded much, but if I drop it off a tower it will probably still work when I climb down and dust it off.)
ANYWAY, with quite a bit of frustration, more than a little consternation, and eventually the loss of my entire /home directory (and all my ebook files, recipes, and everything else you can imagine - the backups were almost two weeks old - I lost quite a bit) I managed to install Python3.7.5, PyQt5, and all of the other requirements to build and run NanoVNA on an OpenSuse Leap 42.3 system.? It will likely work (with some tuning up) on about any other "old piece of junk" that can't handle the newest, latest, and (putatively) 'greatest' distro of Linux.
No more carping, here is how:
Item the first:? This is all done on a terminal command line.? I am going to assume that you know to hit the enter key at the end of a command, and can make your way around the directory structure of your Linux system.
The configure and compile (make) items may be done as the root user, or any normal user, but the 'make install' invocations need to be done as root.? You can fool yourself that you're being "more secure" and use the 'sudo' utility if you like, or you can just log in as the root user and be done with all the fiddling about.? (You can screw up a system just as fast using 'sudo' as you can if you're logged in as the root user.? Maybe faster, if you've bought into the B.S. from various distros that 'sudo' is 'safer.')
On to the install.
Download and install the other requirements listed in the NanoVNA README instructions, particularly the python3-serial, python3-pyqt5, and numpy packages. If they are available from your distro repositories, and they are for Python version 3.7 or higher, use them.? If not, then Python3-serial can probably be found in one of the package repositories for Debian and RedHat systems, such as rpmfind.org or pkgs.org.? Find one that matches your distro and install it.
Numpy likewise is almost universally available these days. Shouldn't be difficult, but if you get stuck, email me off list. Likewise for any other missing bits in these instructions.? I've had decades to perfect my 'being wrong and admitting it' skills.? Don't hesitate to ask, and I will try to clear things up.? Back to the installation.
The PyQt5 part can be particularly problematical on older systems and its installation will be covered below, after the base Python installation is finished.
One more aside.? About the most annoying issue is the change from the historically normal directory structure for system software from
/usr/bin and /usr/sbin
to a /usr/local/bin and /usr/local/sbin tree.? The pathnames and environment variables in Linux can become well and truly scrambled by this.? Some distros use the /usr/local directory, others still use /usr/ tree.? RedHat and OpenSuse happen to use the /usr/local version, and the programmers of Python default to the /usr/ one.
The other minor nightmare is the directory dichotomy between older 32-bit (and 16- and 8-bit, if you go back far enough) back-compatibility library files, and the new default 64-bit architecture libraries.? Rather than staying with the directory name "lib," adding a "compatibility" subdirectory under that longstanding directory name, and getting on with things, the new crop of kids writing the Linux software decided to add a completely new directory, "lib64," to the mix and thoroughly bollocks things up. Of course there are both /usr/lib64 and /usr/local/lib64 variants to make it even more delightful.
Maddening.? Can be dealt with, but -maddening- nonetheless.? Those items caused me half the headaches in getting this to work.
To be certain which your system is, determine where your distro puts system packages, /usr or /usr/local.? You need to know for the configure script.? If /usr, you can just invoke configure without any 'prefix' information.? (If /usr/local, you'll need to add in the prefix data, as shown in the commands below.)
Use your preferred text editor and open the .bashrc file in the user home directory.? (If you use another shell, open the similar file which contains your user settings, aliases, and environment variables.)? Add these variables to the user settings -
export PYTHONHOME=/usr/local
export PYTHONPATH=/usr/local/lib64/python3.7/lib-dynload
Modify the syntax to match your shell if it is not a Bourne derivative.? If your system uses the /usr tree instead of the /usr/local tree, delete the /local part of the path names above.
Next, download the current newest tarball of Python (version 3.7.5 at this writing) -
wget
Unpack it somewhere in a build directory -
tar -xvzf Python-3.7.5.tgz
Move into the Python-3.7.5 directory that is created -
cd Python-3.7.5
Now configure the Python system to match your current setup -
./configure --enable-optimizations --with-ensurepip=install --prefix=/usr/local/bin --with-hash-algorithm=siphash24
Note the --prefix part.? If your system uses /usr/local instead of just /usr, you will need to add this piece of the command.? If you're in a /usr environment, don't use the --prefix part of the command.? (Most distros will require it.)
Wait for the configure process to finish.? If there are errors, usually missing software or libraries, you will have to install whatever is found to be wanting, and then re-run the configure script.
Once configure completes without errors, compile the software -
make
If during configure or make it complains about some crypto libraries not being available, check to see if the utility libffi (and the required package libffi-devel) are installed.? Install them if they are missing, and try configure and make again.? OpenSuse Leap 42.3 required libffi-devel be added; the base package libffi was already installed by default.? Both are absolute requirements for this installation.
If make completes without errors, then install the Python binaries and libraries -
make install
This will give you a working Python-3.7.5 installation in the /usr/local/bin/python3.7.5 directory.? The pip facility and the setup tools should be installed as well, and it will be so noted in the last lines of the install invocation results.
Next, to add in the PyQt5 requirement, download the most current version of PyQt5 -
wget
Unpack it in your build directory -
tar -xvzf PyQt5_gpl-5.13.1.tar.gz
Change to the PyQt5 directory created when you unpack the tarball -
cd PyQt5_gpl-5.13.1
in the case of the version current when I did this.? The command in the README file in that directory should be sufficient to install PyQt5 -
pip install PyQt5
Let it finish; it shouldn't have any errors.? That should fulfill all the NanoVNA prerequisites.? Change to your base build directory, and get the current NanoVNA-saver files by using the github repository system -
git clone
Once it is all downloaded, cd to the nanovna-saver directory which the git utility should have created -
cd nanovna-saver
Then compile and install it -
python3.7 -m pip install .
(Note the dot at the end there.? It's not a fly-speck on the monitor; that period is necessary.)
Allow this to finish.? It needs an internet connection to get everything it wants, so be sure you're still on-line when you invoke this.
That's it.? You're done.? The installer should have put NanoVNASaver in your /usr/local/bin or /usr/bin directory, whichever your system uses.? That makes it available system-wide for all (normal and root) users.
You can create a launcher in your favourite window manager (KDE, Gnome, LXFE, whatever), pointing to the "NanoVNASaver" file in your system bin directory.? Or just open a terminal and type "NanoVNASaver &" to launch the program.
(Remember to plug the USB cable in somewhere in all this...)
--
Wes Will
N9KDY