MyGNUHealth on Librem 5

will it work GnuHealth on Librem 5?
I try to install MyGnuHealth. It has been installed on pinephone, So why not?

Following the documentation It looks simple

Just install via pip

$ pip install --user --upgrade mygnuhealth

but I have no pip on Librem 5.

$ sudo apt-get update 
$ sudo apt-get install pip

Note, selecting ‘python3-pip’ instead of ‘pip’
The following additional packages will be installed:
build-essential dpkg-dev fakeroot g++ g+±10 libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libdpkg-perl
libexpat1-dev libfakeroot libjs-jquery libjs-sphinxdoc libjs-underscore
libpython3-dev libpython3.9-dev libstdc+±10-dev make python-pip-whl
python3-dev python3-setuptools python3-wheel python3.9-dev zlib1g-dev
Suggested packages:
debian-keyring gcc-10-doc bzr libstdc+±10-doc make-doc
python-setuptools-doc
The following NEW packages will be installed:
build-essential dpkg-dev fakeroot g++ g+±10 libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libexpat1-dev
libfakeroot libjs-jquery libjs-sphinxdoc libjs-underscore libpython3-dev
libpython3.9-dev libstdc+±10-dev make python-pip-whl python3-dev
python3-pip python3-setuptools python3-wheel python3.9-dev zlib1g-dev
The following packages will be upgraded:
libdpkg-perl
1 upgraded, 24 newly installed, 0 to remove and 173 not upgraded.
Need to get 21.1 MB/22.7 MB of archives.
After this operation, 75.3 MB of additional disk space will be used.
continue? [Y/n]Y

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_TIME = “es_PY.UTF-8”,
LC_MONETARY = “es_PY.UTF-8”,
LC_ADDRESS = “es_PY.UTF-8”,
LC_TELEPHONE = “es_PY.UTF-8”,
LC_NAME = “es_PY.UTF-8”,
LC_MEASUREMENT = “es_PY.UTF-8”,
LC_IDENTIFICATION = “es_PY.UTF-8”,
LC_NUMERIC = “es_PY.UTF-8”,
LC_PAPER = “es_PY.UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to a fallback locale (“en_US.UTF-8”).
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package libstdc+±10-dev:arm64.
(Reading database … 111087 files and directories currently installed.)
Preparing to unpack …/00-libstdc+±10-dev_10.2.1-6_arm64.deb …
Unpacking libstdc+±10-dev:arm64 (10.2.1-6) …
Selecting previously unselected package g+±10.
Preparing to unpack …/01-g+±10_10.2.1-6_arm64.deb …
Unpacking g+±10 (10.2.1-6) …
Selecting previously unselected package g++.
Preparing to unpack …/02-g++_4%3a10.2.1-1_arm64.deb …
Unpacking g++ (4:10.2.1-1) …
Selecting previously unselected package make.
Preparing to unpack …/03-make_4.3-4.1_arm64.deb …
Unpacking make (4.3-4.1) …
Preparing to unpack …/04-libdpkg-perl_1.20.12pureos1_all.deb …
Unpacking libdpkg-perl (1.20.12pureos1) over (1.20.9pureos2) …
Selecting previously unselected package dpkg-dev.
Preparing to unpack …/05-dpkg-dev_1.20.12pureos1_all.deb …
Unpacking dpkg-dev (1.20.12pureos1) …
Selecting previously unselected package build-essential.
Preparing to unpack …/06-build-essential_12.9_arm64.deb …
Unpacking build-essential (12.9) …
Selecting previously unselected package libfakeroot:arm64.
Preparing to unpack …/07-libfakeroot_1.25.3-1.1_arm64.deb …
Unpacking libfakeroot:arm64 (1.25.3-1.1) …
Selecting previously unselected package fakeroot.
Preparing to unpack …/08-fakeroot_1.25.3-1.1_arm64.deb …
Unpacking fakeroot (1.25.3-1.1) …
Selecting previously unselected package libalgorithm-diff-perl.
Preparing to unpack …/09-libalgorithm-diff-perl_1.201-1_all.deb …
Unpacking libalgorithm-diff-perl (1.201-1) …
Selecting previously unselected package libalgorithm-diff-xs-perl.
Preparing to unpack …/10-libalgorithm-diff-xs-perl_0.04-6+b1_arm64.deb …
Unpacking libalgorithm-diff-xs-perl (0.04-6+b1) …
Selecting previously unselected package libalgorithm-merge-perl.
Preparing to unpack …/11-libalgorithm-merge-perl_0.08-3_all.deb …
Unpacking libalgorithm-merge-perl (0.08-3) …
Selecting previously unselected package libexpat1-dev:arm64.
Preparing to unpack …/12-libexpat1-dev_2.2.10-2+deb11u5_arm64.deb …
Unpacking libexpat1-dev:arm64 (2.2.10-2+deb11u5) …
Selecting previously unselected package libjs-jquery.
Preparing to unpack …/13-libjs-jquery_3.5.1+dfsg+~3.5.5-7_all.deb …
Unpacking libjs-jquery (3.5.1+dfsg+~3.5.5-7) …
Selecting previously unselected package libjs-underscore.
Preparing to unpack …/14-libjs-underscore_1.9.1~dfsg-3_all.deb …
Unpacking libjs-underscore (1.9.1~dfsg-3) …
Selecting previously unselected package libjs-sphinxdoc.
Preparing to unpack …/15-libjs-sphinxdoc_3.4.3-2_all.deb …
Unpacking libjs-sphinxdoc (3.4.3-2) …
Selecting previously unselected package libpython3.9-dev:arm64.
Preparing to unpack …/16-libpython3.9-dev_3.9.2-1_arm64.deb …
Unpacking libpython3.9-dev:arm64 (3.9.2-1) …
Selecting previously unselected package libpython3-dev:arm64.
Preparing to unpack …/17-libpython3-dev_3.9.2-3_arm64.deb …
Unpacking libpython3-dev:arm64 (3.9.2-3) …
Selecting previously unselected package python-pip-whl.
Preparing to unpack …/18-python-pip-whl_20.3.4-4+deb11u1_all.deb …
Unpacking python-pip-whl (20.3.4-4+deb11u1) …
Selecting previously unselected package zlib1g-dev:arm64.
Preparing to unpack …/19-zlib1g-dev_1%3a1.2.11.dfsg-2+deb11u2_arm64.deb …
Unpacking zlib1g-dev:arm64 (1:1.2.11.dfsg-2+deb11u2) …
Selecting previously unselected package python3.9-dev.
Preparing to unpack …/20-python3.9-dev_3.9.2-1_arm64.deb …
Unpacking python3.9-dev (3.9.2-1) …
Selecting previously unselected package python3-dev.
Preparing to unpack …/21-python3-dev_3.9.2-3_arm64.deb …
Unpacking python3-dev (3.9.2-3) …
Selecting previously unselected package python3-setuptools.
Preparing to unpack …/22-python3-setuptools_52.0.0-4_all.deb …
Unpacking python3-setuptools (52.0.0-4) …
Selecting previously unselected package python3-wheel.
Preparing to unpack …/23-python3-wheel_0.34.2-1_all.deb …
Unpacking python3-wheel (0.34.2-1) …
Selecting previously unselected package python3-pip.
Preparing to unpack …/24-python3-pip_20.3.4-4+deb11u1_all.deb …
Unpacking python3-pip (20.3.4-4+deb11u1) …
Setting up libstdc+±10-dev:arm64 (10.2.1-6) …
Setting up g+±10 (10.2.1-6) …
Setting up python3-setuptools (52.0.0-4) …
Setting up libalgorithm-diff-perl (1.201-1) …
Setting up python3-wheel (0.34.2-1) …
Setting up libfakeroot:arm64 (1.25.3-1.1) …
Setting up fakeroot (1.25.3-1.1) …
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up libexpat1-dev:arm64 (2.2.10-2+deb11u5) …
Setting up make (4.3-4.1) …
Setting up libdpkg-perl (1.20.12pureos1) …
Setting up zlib1g-dev:arm64 (1:1.2.11.dfsg-2+deb11u2) …
Setting up g++ (4:10.2.1-1) …
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up python-pip-whl (20.3.4-4+deb11u1) …
Setting up libjs-jquery (3.5.1+dfsg+~3.5.5-7) …
Setting up libalgorithm-diff-xs-perl (0.04-6+b1) …
Setting up libjs-underscore (1.9.1~dfsg-3) …
Setting up libalgorithm-merge-perl (0.08-3) …
Setting up libpython3.9-dev:arm64 (3.9.2-1) …
Setting up dpkg-dev (1.20.12pureos1) …
Setting up python3-pip (20.3.4-4+deb11u1) …
Setting up libjs-sphinxdoc (3.4.3-2) …
Setting up python3.9-dev (3.9.2-1) …
Setting up build-essential (12.9) …
Setting up libpython3-dev:arm64 (3.9.2-3) …
Setting up python3-dev (3.9.2-3) …
Processing triggers for man-db (2.9.4-2) …
Processing triggers for libc-bin (2.31-13+deb11u5) …

Now the installation of MyGnuHealth

purism@pureos:~$ pip install --user --upgrade mygnuhealth
Collecting mygnuhealth
Downloading mygnuhealth-2.0.0-py3-none-any.whl (2.6 MB)
|████████████████████████████████| 2.6 MB 1.3 MB/s
Collecting tinycss
Downloading tinycss-0.4.tar.gz (87 kB)
|████████████████████████████████| 87 kB 1.9 MB/s
Collecting pygal
Downloading pygal-3.0.4-py2.py3-none-any.whl (130 kB)
|████████████████████████████████| 130 kB 3.1 MB/s
Collecting kivy
Downloading Kivy-2.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (21.1 MB)
|████████████████████████████████| 21.1 MB 139 kB/s
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from mygnuhealth) (2.25.1)
Collecting tinydb
Downloading tinydb-4.8.0-py3-none-any.whl (24 kB)
Collecting cairosvg
Downloading CairoSVG-2.7.1-py3-none-any.whl (43 kB)
|████████████████████████████████| 43 kB 538 kB/s
Requirement already satisfied: bcrypt in /usr/lib/python3/dist-packages (from mygnuhealth) (3.1.7)
Collecting cssselect
Downloading cssselect-1.2.0-py2.py3-none-any.whl (18 kB)
Collecting cssselect2
Downloading cssselect2-0.7.0-py3-none-any.whl (15 kB)
Collecting defusedxml
Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting cairocffi
Downloading cairocffi-1.6.1-py3-none-any.whl (75 kB)
|████████████████████████████████| 75 kB 1.2 MB/s
Collecting pillow
Downloading pillow-10.2.0-cp39-cp39-manylinux_2_28_aarch64.whl (4.3 MB)
|████████████████████████████████| 4.3 MB 1.9 MB/s
Collecting tinycss2
Downloading tinycss2-1.2.1-py3-none-any.whl (21 kB)
Collecting cffi>=1.1.0
Downloading cffi-1.16.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (444 kB)
|████████████████████████████████| 444 kB 237 kB/s
Collecting pycparser
Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
|████████████████████████████████| 118 kB 10.6 MB/s
Collecting webencodings
Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting Kivy-Garden>=0.1.4
Downloading Kivy_Garden-0.1.5-py3-none-any.whl (4.6 kB)
Requirement already satisfied: pygments in /usr/lib/python3/dist-packages (from kivy->mygnuhealth) (2.7.1)
Collecting docutils
Downloading docutils-0.20.1-py3-none-any.whl (572 kB)
|████████████████████████████████| 572 kB 5.6 MB/s
Requirement already satisfied: importlib-metadata in /usr/lib/python3/dist-packages (from pygal->mygnuhealth) (1.6.0)
Building wheels for collected packages: tinycss
Building wheel for tinycss (setup.py) … done
Created wheel for tinycss: filename=tinycss-0.4-py3-none-any.whl size=43939 sha256=01f769acd99ab07fed5aadf9931e5c7694a30db2d7f968ff4c35023b76a4c2e8
Stored in directory: /home/purism/.cache/pip/wheels/3e/aa/c8/a90f77d8eaa4590b338c395135e2bd8c2ef63ec0483e000fa5
Successfully built tinycss
Installing collected packages: webencodings, pycparser, tinycss2, cffi, pillow, Kivy-Garden, docutils, defusedxml, cssselect2, cairocffi, tinydb, tinycss, pygal, kivy, cssselect, cairosvg, mygnuhealth
WARNING: The script docutils is installed in ‘/home/purism/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script cairosvg is installed in ‘/home/purism/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed Kivy-Garden-0.1.5 cairocffi-1.6.1 cairosvg-2.7.1 cffi-1.16.0 cssselect-1.2.0 cssselect2-0.7.0 defusedxml-0.7.1 docutils-0.20.1 kivy-2.3.0 mygnuhealth-2.0.0 pillow-10.2.0 pycparser-2.21 pygal-3.0.4 tinycss-0.4 tinycss2-1.2.1 tinydb-4.8.0 webencodings-0.5.1

:no_entry: An Icon should be appear on the screen but … no

No problem. The documentation says I can start the package from terminal with

~$ .local/bin/mygnuhealth

results:

[WARNING] [Config ] Older configuration version detected (0 instead of 27)
[WARNING] [Config ] Upgrading configuration in progress.
[DEBUG ] [Config ] Upgrading from 0 to 1
[INFO ] [Logger ] Record log in /home/purism/.kivy/logs/kivy_24-01-07_0.txt
[INFO ] [Kivy ] v2.3.0
[INFO ] [Kivy ] Installed at “/home/purism/.local/lib/python3.9/site-packages/kivy/init.py”
[INFO ] [Python ] v3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110]
[INFO ] [Python ] Interpreter at “/usr/bin/python3”
[INFO ] [Logger ] Purge log fired. Processing…
[INFO ] [Logger ] Purge finished!
[INFO ] [Factory ] 195 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
Traceback (most recent call last):
File “/home/purism/.local/bin/mygnuhealth”, line 5, in
from mygnuhealth import main
File “/home/purism/.local/lib/python3.9/site-packages/mygnuhealth/main.py”, line 34, in
from mygnuhealth.user_account import UserAccount
File “/home/purism/.local/lib/python3.9/site-packages/mygnuhealth/user_account.py”, line 14, in
from mygnuhealth.core import maindb, get_personal_key,
File “/home/purism/.local/lib/python3.9/site-packages/mygnuhealth/core.py”, line 33, in
import pygal
File “/home/purism/.local/lib/python3.9/site-packages/pygal/init.py”, line 65, in
for entry in entry_points(group=“pygal.maps”):
TypeError: entry_points() got an unexpected keyword argument ‘group’

Adding PATH

PATH=$PATH:/home/purism/.local/bin

No change. The package doesn’t start.

several lines in several .py files with errors.

Now. Uninstall MyGnuHealth

but it is not explained on documentation.

reading for a general way to uninstall python packages with pip

Edit:

Removing MyGnuHealth and dependencies and pip

$ pip uninstall -y pygments importlib-metadata webencodings pycparser tinycss2 cffi pillow Kivy-Garden docutils defusedxml cssselect2 cairocffi tinydb tinycss pygal kivy cssselect kairosvg mygnuhealth

$ sudo apt remove pip && sudo apt purge pip && sudo autoremove

Recommendation

MyGnuHealth isn’t ready to use.

You can contact the GNU Solidario founder

4 Likes

I followed your way just as you described (except I did use pip3 in place of pip), with the same result : «TypeError: entry_points() got an unexpected keyword argument ‘group’».
I found this : pip3 install --upgrade importlib_metadata
And now mygnuhealth starts without error.

3 Likes

@pak
It worked for me too! Thanks.

To install MyGNUHealth on Librem5:

1. Create mygnuhealth.desktop file with this:

[Desktop Entry]
Name=MyGNUHealth
Type=Application
Terminal=True
Icon=/home/purism/local/share/icons/mygnuhealth.png
Exec=/home/purism/.local/bin/mygnuhealth
Categories=Utility

2. Copy Icon file (mygnuhealth.png) to /home/purism/local/share/icons/
mygnuhealt

3. Install via pip3 on terminal

$ pip3 install --user --upgrade mygnuhealth importlib_metadata

The icon should appear and you should run from it MyGNUHealth

Some snapshots





4 Likes