On Thu, Jan 16, 2020 at 08:26 AM, Rune Broberg wrote:
I'm a little confused as to the decision on the Linux Mint packagers to
release 19.3 late last year with Python 3.6, when 3.7 was already more than
18 months old, and 3.8 had just been released as well. Going with a version
that old is bound to cause problems for the users.
Yes, we might even have got a newer version of python-pip3 - see below.
Anyway, getting near to the bottom of this now. Following notes apply to LM19.3.
As I understand it
$ python3.7 -m pip install .
parses ~/nanovna-saver/requirements.txt and installs the latest versions of the required python distribution packages if they are not already installed i.e.
scipy
pyqt5
pyserial
numpy
pip will always install the latest versions, not whatever (older) versions happen to be available from the distro package management system - which is good.
Since 15.12.19 when I installed nanovna-saver-0.2.2a there have been two new versions of PyQt5...
The installation error reported arises when pip3 attempts to install PyQt5==5.14.1. We are not alone...
The pip3 version provided with the distro package python3-pip appears to be too old.
$ pip3 -V
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
Having read more about it seems that using sudo with pip3 to overcome the error (as suggested in my earlier post #9634 and elsewhere) is a bad idea; if you need to use sudo you are probably trying to modify a distro file.
There is no easy way to upgrade the version of pip3 supplied by the distro package python3-pip. If the package manager advertises a new version then you can install that as an update. It's a distro file and you shouldn't try to upgrade it any other way. I managed to break (and fix) pip3 several times in the attempt.
One way round this problem would be to install nanovna-saver in a python virtual environment.
Another way is to modify ~/nanovna-saver/requirements.txt...
scipy
pyqt5==5.13.2
pyserial
numpy
then from ~/nanovna-saver/
$ python3.7 -m pip install -r ./requirements.txt .
This installs PyQt5==5.13.2 which is the version I used on 15.12.19.
I have tested this and it seems to work properly.
I do not understand why I had to explicitly specify the path to requirements.txt though.
Nick