I need to use asammdf as part of my app to concatenate multiple .MF4 files. If you know about other ways, I will gladly try other packages.
Problem is that it runs on windows but once I try to build docker image (on linux) with asammdf (tried same version as I have on windows and even some other) in requirements, it fails to install.
dockerfile:
FROM python:3.9-slim
COPY ./requirements.txt requirements.txt
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
requirements.txt
asammdf==6.2.0
output:
…
Building wheels for collected packages: asammdf, future
Building wheel for asammdf (pyproject.toml): started
Building wheel for asammdf (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Building wheel for asammdf (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [128 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-39
creating build/lib.linux-x86_64-cpython-39/asammdf
copying asammdf/signal.py -> build/lib.linux-x86_64-cpython-39/asammdf
copying asammdf/mdf.py -> build/lib.linux-x86_64-cpython-39/asammdf
copying asammdf/__init__.py -> build/lib.linux-x86_64-cpython-39/asammdf
copying asammdf/version.py -> build/lib.linux-x86_64-cpython-39/asammdf
creating build/lib.linux-x86_64-cpython-39/asammdf/blocks
copying asammdf/blocks/v4_blocks.py -> build/lib.linux-x86_64-cpython-39/asammdf/blocks
copying asammdf/blocks/mdf_v3.py -> build/lib.linux-x86_64-cpython-39/asammdf/blocks
copying asammdf/blocks/v2_v3_blocks.py -> build/lib.linux-x86_64-cpython-39/asammdf/blocks
copying asammdf/blocks/conversion_utils.py -> build/lib.linux-x86_64-cpython-39/asammdf/blocks
copying asammdf/blocks/v4_constants.py -> build/lib.linux-x86_64-cpython-39/asammdf/blocks
copying asammdf/blocks/source_utils.py -> build/lib.linux-x86_64-cpython-39/asammdf/blocks
copying asammdf/blocks/mdf_v2.py -> build/lib.linux-x86_64-cpython-39/asammdf/blocks
copying asammdf/blocks/bus_logging_utils.py -> build/lib.linux-x86_64-cpython-39/asammdf/blocks
copying asammdf/blocks/utils.py -> build/lib.linux-x86_64-cpython-39/asammdf/blocks
copying asammdf/blocks/v2_v3_constants.py -> build/lib.linux-x86_64-cpython-39/asammdf/blocks
copying asammdf/blocks/mdf_common.py -> build/lib.linux-x86_64-cpython-39/asammdf/blocks
copying asammdf/blocks/__init__.py -> build/lib.linux-x86_64-cpython-39/asammdf/blocks
copying asammdf/blocks/mdf_v4.py -> build/lib.linux-x86_64-cpython-39/asammdf/blocks
creating build/lib.linux-x86_64-cpython-39/asammdf/gui
copying asammdf/gui/plot.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui
copying asammdf/gui/cx.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui
copying asammdf/gui/utils.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui
copying asammdf/gui/asammdfgui.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui
copying asammdf/gui/__init__.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui
creating build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/channel_display.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/tree_numeric.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/tabular_filter.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/plot_standalone.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/tabular.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/channel_info.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/mdi_area.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/tree.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/plot.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/file.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/channel_stats.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/search.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/list.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/cursor.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/attachment.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/channel_group_info.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/list_item.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/can_bus_trace.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/collapsiblebox.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/main.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/formated_axis.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/numeric.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/lin_bus_trace.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/tree_item.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/batch.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/__init__.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/dict_to_tree.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
copying asammdf/gui/widgets/tabular_base.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/widgets
creating build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/search_dialog.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/tabular_filter.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/define_channel_dialog.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/multi_search_dialog.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/tabular.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/windows_selection_dialog.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/channel_group_info_widget.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/channel_stats.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/file_widget.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/error_dialog.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/attachment.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/batch_widget.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/range_editor_dialog.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/resource_rc.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/values_dialog.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/numeric.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/channel_info_widget.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/main_window.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/channel_display_widget.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/__init__.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
creating build/lib.linux-x86_64-cpython-39/asammdf/gui/dialogs
copying asammdf/gui/dialogs/range_editor.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/dialogs
copying asammdf/gui/dialogs/window_selection_dialog.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/dialogs
copying asammdf/gui/dialogs/tabular.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/dialogs
copying asammdf/gui/dialogs/multi_search.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/dialogs
copying asammdf/gui/dialogs/channel_info.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/dialogs
copying asammdf/gui/dialogs/error_dialog.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/dialogs
copying asammdf/gui/dialogs/channel_group_info.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/dialogs
copying asammdf/gui/dialogs/define_channel.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/dialogs
copying asammdf/gui/dialogs/advanced_search.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/dialogs
copying asammdf/gui/dialogs/__init__.py -> build/lib.linux-x86_64-cpython-39/asammdf/gui/dialogs
running egg_info
writing asammdf.egg-info/PKG-INFO
writing dependency_links to asammdf.egg-info/dependency_links.txt
writing entry points to asammdf.egg-info/entry_points.txt
writing requirements to asammdf.egg-info/requires.txt
writing top-level names to asammdf.egg-info/top_level.txt
reading manifest file 'asammdf.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'asammdf.egg-info/SOURCES.txt'
copying asammdf/blocks/cutils.c -> build/lib.linux-x86_64-cpython-39/asammdf/blocks
copying asammdf/gui/ui/attachment.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/batch_widget.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/channel_display_widget.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/channel_group_info_widget.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/channel_info_widget.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/channel_stats.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/define_channel_dialog.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/error_dialog.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/file_widget.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/main_window.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/multi_search_dialog.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/numeric.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/range_editor_dialog.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/resource.qrc -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/search_dialog.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/tabular.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/tabular_filter.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/values_dialog.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
copying asammdf/gui/ui/windows_selection_dialog.ui -> build/lib.linux-x86_64-cpython-39/asammdf/gui/ui
running build_ext
building 'asammdf.blocks.cutils' extension
creating build/temp.linux-x86_64-cpython-39
creating build/temp.linux-x86_64-cpython-39/asammdf
creating build/temp.linux-x86_64-cpython-39/asammdf/blocks
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tmp/pip-build-env-kff6bke_/overlay/lib/python3.9/site-packages/numpy/core/include -I/usr/local/include/python3.9 -c asammdf/blocks/cutils.c -o build/temp.linux-x86_64-cpython-39/asammdf/blocks/cutils.o
error: command 'gcc' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for asammdf
Building wheel for future (setup.py): started
Building wheel for future (setup.py): finished with status 'done'
Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491070 sha256=9eb7454ae5d981f6797726bfaac55aab83ad106dddc62b530856a02c208bed22
Stored in directory: /root/.cache/pip/wheels/96/66/19/2de75120f5d0bc185e9d16cf0fd223d8471ed025de08e45867
Successfully built future
Failed to build asammdf
ERROR: Could not build wheels for asammdf, which is required to install pyproject.toml-based projects
The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
ERROR: Service 'py_data_processing' failed to build : Build failed
2
Answers
Make sure you have numpy installed before trying to install asammdf
In error messages, it is says "error: command ‘gcc’ failed: No such file or directory".
So, you may need to install gcc to your container.
Try to add this line, before pip install.
RUN apt-get install build-essential