Open Rhaban745 opened 1 month ago
Hi Rhaban,
I wish the error log identified the "module that was compiled using NumPy 1.x". I merged in an update yesterday to support newer releases of the matplotlib library. I tested that on a Mint 22 system. Today, I built a Mint 21 system (using VirtualBox) and followed the installation procedure. It worked fine. I suspect that there is some python library which is outdated on your system.
First, let's update the version of dexctrack on your system, so it will work with the latest matplotlib version.
cd /home/rlpclin/dexctrack
git pull origin master
Next, use 'pip3' to update any of the packages we depend on. The '-U' option tells it to upgrade, if possible.
pip3 install matplotlib pyserial pytz tzlocal numpy pympler -U
On my virtual Mint 21 system it looks like this.
~/newdex/dexctrack$ pip3 install matplotlib pyserial pytz tzlocal numpy pympler -U
Requirement already satisfied: matplotlib in ./env/lib/python3.10/site-packages (3.9.2)
Requirement already satisfied: pyserial in ./env/lib/python3.10/site-packages (3.5)
Requirement already satisfied: pytz in ./env/lib/python3.10/site-packages (2024.2)
Requirement already satisfied: tzlocal in ./env/lib/python3.10/site-packages (5.2)
Requirement already satisfied: numpy in ./env/lib/python3.10/site-packages (2.1.2)
Requirement already satisfied: pympler in ./env/lib/python3.10/site-packages (1.1)
Requirement already satisfied: pyparsing>=2.3.1 in ./env/lib/python3.10/site-packages (from matplotlib) (3.2.0)
Requirement already satisfied: pillow>=8 in ./env/lib/python3.10/site-packages (from matplotlib) (11.0.0)
Requirement already satisfied: packaging>=20.0 in ./env/lib/python3.10/site-packages (from matplotlib) (24.1)
Requirement already satisfied: cycler>=0.10 in ./env/lib/python3.10/site-packages (from matplotlib) (0.12.1)
Requirement already satisfied: kiwisolver>=1.3.1 in ./env/lib/python3.10/site-packages (from matplotlib) (1.4.7)
Requirement already satisfied: contourpy>=1.0.1 in ./env/lib/python3.10/site-packages (from matplotlib) (1.3.0)
Requirement already satisfied: python-dateutil>=2.7 in ./env/lib/python3.10/site-packages (from matplotlib) (2.9.0.post0)
Requirement already satisfied: fonttools>=4.22.0 in ./env/lib/python3.10/site-packages (from matplotlib) (4.54.1)
Requirement already satisfied: six>=1.5 in ./env/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib) (1.16.0)
In my case, there was nothing to update because I just installed the latest libraries. Hopefully, some old library on your system (which was built using NumPy 1.x will get updated).
Try these steps, and then run the program with the '-d' debug option. This might work or show us something more to trace the problem.
python3 dexctrack.py -d
@Rhaban745 Did my suggested steps get it to work for you?
Dear Mr Erlenborn, I had used dexctrack.py for many years under Ubuntu and it worked very well. I am diabetic type 1 and 70 years old. Now, I use Mint 21 and it is no longer possible to start the program. When I enter
python3 dexctrack.py
I get `A module that was compiled using NumPy 1.x cannot be run in NumPy 2.1.2 as it may crash. To support both 1.x and 2.x versions of NumPy, modules must be compiled with NumPy 2.0. Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.If you are a user of the module, the easiest solution will be to downgrade to 'numpy<2' or try to upgrade the affected module. We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "/home/rlpclin/dexctrack/dexctrack.py", line 34, in
import matplotlib as mpl
File "/usr/lib/python3/dist-packages/matplotlib/init.py", line 109, in
from . import _api, _version, cbook, docstring, rcsetup
File "/usr/lib/python3/dist-packages/matplotlib/rcsetup.py", line 27, in
from matplotlib.colors import Colormap, is_color_like
File "/usr/lib/python3/dist-packages/matplotlib/colors.py", line 56, in
from matplotlib import _api, cbook, scale
File "/usr/lib/python3/dist-packages/matplotlib/scale.py", line 23, in
from matplotlib.ticker import (
File "/usr/lib/python3/dist-packages/matplotlib/ticker.py", line 136, in
from matplotlib import transforms as mtransforms
File "/usr/lib/python3/dist-packages/matplotlib/transforms.py", line 46, in
from matplotlib._path import (
AttributeError: _ARRAY_API not found
Traceback (most recent call last):
File "/home/rlpclin/dexctrack/dexctrack.py", line 34, in
import matplotlib as mpl
File "/usr/lib/python3/dist-packages/matplotlib/init.py", line 109, in
from . import _api, _version, cbook, docstring, rcsetup
File "/usr/lib/python3/dist-packages/matplotlib/rcsetup.py", line 27, in
from matplotlib.colors import Colormap, is_color_like
File "/usr/lib/python3/dist-packages/matplotlib/colors.py", line 56, in
from matplotlib import _api, cbook, scale
File "/usr/lib/python3/dist-packages/matplotlib/scale.py", line 23, in
from matplotlib.ticker import (
File "/usr/lib/python3/dist-packages/matplotlib/ticker.py", line 136, in
from matplotlib import transforms as mtransforms
File "/usr/lib/python3/dist-packages/matplotlib/transforms.py", line 46, in
from matplotlib._path import (
ImportError: numpy.core.multiarray failed to import
`
I would be grateful if you could help me.
Rhaban