Node-Red container and machine learning node

I have a Windows System.
Inside the Windows System, I have Virtual Box with Ubuntu
Inside the Ubuntu, I have installed Node-Red as docker
I have also installed the node-red-contrib-python-function.
I have also installed the node-red-contrib-python3-function.
I have also installed the node-red-contrib-python-machine-learning-v2
I have imported the example flows json template on the node's page (node-red-contrib-python-machine-learning-v2).

The flows are unable to be deployed as multiple errors occur like:
import pandas ModuleNotFoundError No module named 'pandas'
import sklearn ModuleNotFoundError No module named 'sklearn'

I have read several issues and articles and I concluded that I have to install python and pandas in the host machine, without any success.

Now the silly question...
Does it matter that Node-Red is inside a container, should I install python and pandas inside the container, is that possible?

Yes - you need python and panda inside the container. As you are running a VM do you need really need to run inside docker as well ? If you really need it in a container you may be best building your own container either based off the existing image or using the customisable docker-custom image in our main repo https://github.com/node-red/node-red-docker

1 Like

Based on the page you provided, this command:

docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red:latest

which doesn't specify the "image-type", I believe that it will be "none" by default".
So can somehow check that I have Python?

----Update----
I managed to attach the terminal and check that I have python
sudo docker exec -it mynodered bash
python3 --version -> 3.8.2
python --version -> 2.7.18

So the python cannot find the module pandas that the node is requesting, because node-red container has python but not pandas inside while the machine learning node is expecting them.

Also tried to install numpy and pandas using the following commands:
python3 -m pip install numpy
python3 -m pip install pandas
But I get a huge error message.

correct as they are extra packages that need to be installed.

So how can I install these extra packages inside the container?
I tried already via bash without success...
python3 -m pip install numpy
python3 -m pip install pandas

An alternative is not to use the python-function nodes (which I think others have had trouble with), write your functions in javascript instead, or use an exec node to call out to python scripts.

Hi, I am using only machine-learning nodes in the flow.

I just installed the python functions to make sure that are not prerequisites.

OK, I misunderstood, I thought it was the python function nodes that were causing the problem. You can take those out if you are not using them.

That's true, I can remove them or leave them for feature building.
But what about the issue of machine-learning node?
How can I install the pandas and other packages inside the container?

Can't help with that one I am afraid, I don't know much about Docker.

Maybe this can help, once I am with bash attached into the container and as the root user, I am executing the "pip install pandas" and I get this:

ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3.8 /usr/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-nfst1lxs/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.21,<3' 'numpy==1.15.4; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.15.4; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy; python_version>='"'"'3.9'"'"''
       cwd: None
  Complete output (703 lines):
  Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.8" and platform_system == "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version >= "3.9"' don't match your environment
  Collecting setuptools
    Using cached setuptools-50.3.2-py3-none-any.whl (785 kB)
  Collecting wheel
    Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
  Collecting Cython<3,>=0.29.21
    Using cached Cython-0.29.21-py2.py3-none-any.whl (974 kB)
  Collecting numpy==1.17.3
    Using cached numpy-1.17.3.zip (6.4 MB)
  Building wheels for collected packages: numpy
    Building wheel for numpy (setup.py): started
    Building wheel for numpy (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ldkko_7q/numpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ldkko_7q/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-jvnvy0mv
         cwd: /tmp/pip-install-ldkko_7q/numpy/
    Complete output (331 lines):
    Running from numpy source directory.
    blas_opt_info:
    blas_mkl_info:
    customize UnixCCompiler
      libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
  
    blis_info:
    customize UnixCCompiler
      libraries blis not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
  
    openblas_info:
    customize UnixCCompiler
    customize UnixCCompiler
      libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
  
    atlas_3_10_blas_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries tatlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
  
    atlas_3_10_blas_info:
    customize UnixCCompiler
      libraries satlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
  
    atlas_blas_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
  
    atlas_blas_info:
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
  
    accelerate_info:
      NOT AVAILABLE
  
    /tmp/pip-install-ldkko_7q/numpy/numpy/distutils/system_info.py:690: UserWarning:
        Optimized (vendor) Blas libraries are not found.
        Falls back to netlib Blas library which has worse performance.
        A better performance should be easily gained by switching
        Blas library.
      self.calc_info()
    blas_info:
    customize UnixCCompiler
      libraries blas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
  
    /tmp/pip-install-ldkko_7q/numpy/numpy/distutils/system_info.py:690: UserWarning:
        Blas (http://www.netlib.org/blas/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [blas]) or by setting
        the BLAS environment variable.
      self.calc_info()
    blas_src_info:
      NOT AVAILABLE
  
    /tmp/pip-install-ldkko_7q/numpy/numpy/distutils/system_info.py:690: UserWarning:
        Blas (http://www.netlib.org/blas/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [blas_src]) or by setting
        the BLAS_SRC environment variable.
      self.calc_info()
      NOT AVAILABLE
  
    /bin/sh: svnversion: not found
    non-existing path in 'numpy/distutils': 'site.cfg'
    lapack_opt_info:
    lapack_mkl_info:
    customize UnixCCompiler
      libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
  
    openblas_lapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
      libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
  
    openblas_clapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
      libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
  
    flame_info:
    customize UnixCCompiler
      libraries flame not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
  
    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/lib/
    <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
      NOT AVAILABLE
  
    atlas_3_10_info:
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/lib/
    <class 'numpy.distutils.system_info.atlas_3_10_info'>
      NOT AVAILABLE
  
    atlas_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/lib/
    <class 'numpy.distutils.system_info.atlas_threads_info'>
      NOT AVAILABLE
  
    atlas_info:
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/lib/
    <class 'numpy.distutils.system_info.atlas_info'>
      NOT AVAILABLE
  
    lapack_info:
    customize UnixCCompiler
      libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
      NOT AVAILABLE
  
    /tmp/pip-install-ldkko_7q/numpy/numpy/distutils/system_info.py:1712: UserWarning:
        Lapack (http://www.netlib.org/lapack/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [lapack]) or by setting
        the LAPACK environment variable.
      if getattr(self, '_calc_info_{}'.format(lapack))():
    lapack_src_info:
      NOT AVAILABLE
  
    /tmp/pip-install-ldkko_7q/numpy/numpy/distutils/system_info.py:1712: UserWarning:
        Lapack (http://www.netlib.org/lapack/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [lapack_src]) or by setting
        the LAPACK_SRC environment variable.
      if getattr(self, '_calc_info_{}'.format(lapack))():
      NOT AVAILABLE
  
    /usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
      warnings.warn(msg)
    running bdist_wheel
    running build
    running config_cc
    unifing config_cc, config, build_clib, build_ext, build commands --compiler options
    running config_fc
    unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
    running build_src
    build_src
    building py_modules sources
    creating build
    creating build/src.linux-x86_64-3.8
    creating build/src.linux-x86_64-3.8/numpy
    creating build/src.linux-x86_64-3.8/numpy/distutils
    building library "npymath" sources
    get_default_fcompiler: matching types: '['gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor']'
    customize Gnu95FCompiler
    Could not locate executable gfortran
    Could not locate executable f95
    customize IntelFCompiler
    Could not locate executable ifort
    Could not locate executable ifc
    customize LaheyFCompiler
    Could not locate executable lf95
    customize PGroupFCompiler
    Could not locate executable pgfortran
    customize AbsoftFCompiler
    Could not locate executable f90
    Could not locate executable f77
    customize NAGFCompiler
    customize VastFCompiler
    customize CompaqFCompiler
    Could not locate executable fort
    customize IntelItaniumFCompiler
    Could not locate executable efort
    Could not locate executable efc
    customize IntelEM64TFCompiler
    customize GnuFCompiler
    Could not locate executable g77
    customize G95FCompiler
    Could not locate executable g95
    customize PathScaleFCompiler
    Could not locate executable pathf95
    customize NAGFORCompiler
    Could not locate executable nagfor
    don't know how to compile Fortran code on platform 'posix'
    C compiler: gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC
  
    compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.8 -c'
    gcc: _configtest.c
    gcc _configtest.o -o _configtest
    success!
    removing: _configtest.c _configtest.o _configtest.o.d _configtest
    C compiler: gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC
  
    compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.8 -c'
    gcc: _configtest.c
    _configtest.c:1:5: warning: conflicting types for built-in function 'exp'; expected 'double(double)' [-Wbuiltin-declaration-mismatch]
        1 | int exp (void);
          |     ^~~
    _configtest.c:1:1: note: 'exp' is declared in header '<math.h>'
      +++ |+#include <math.h>
        1 | int exp (void);
    gcc _configtest.o -o _configtest
    success!
    removing: _configtest.c _configtest.o _configtest.o.d _configtest
    creating build/src.linux-x86_64-3.8/numpy/core
    creating build/src.linux-x86_64-3.8/numpy/core/src
    creating build/src.linux-x86_64-3.8/numpy/core/src/npymath
    conv_template:> build/src.linux-x86_64-3.8/numpy/core/src/npymath/npy_math_internal.h
      adding 'build/src.linux-x86_64-3.8/numpy/core/src/npymath' to include_dirs.
    conv_template:> build/src.linux-x86_64-3.8/numpy/core/src/npymath/ieee754.c
    conv_template:> build/src.linux-x86_64-3.8/numpy/core/src/npymath/npy_math_complex.c
    None - nothing done with h_files = ['build/src.linux-x86_64-3.8/numpy/core/src/npymath/npy_math_internal.h']
    building library "npysort" sources
    creating build/src.linux-x86_64-3.8/numpy/core/src/common
    conv_template:> build/src.linux-x86_64-3.8/numpy/core/src/common/npy_sort.h
      adding 'build/src.linux-x86_64-3.8/numpy/core/src/common' to include_dirs.
    creating build/src.linux-x86_64-3.8/numpy/core/src/npysort
    conv_template:> build/src.linux-x86_64-3.8/numpy/core/src/npysort/quicksort.c
    conv_template:> build/src.linux-x86_64-3.8/numpy/core/src/npysort/mergesort.c
    conv_template:> build/src.linux-x86_64-3.8/numpy/core/src/npysort/timsort.c
    conv_template:> build/src.linux-x86_64-3.8/numpy/core/src/npysort/heapsort.c
    conv_template:> build/src.linux-x86_64-3.8/numpy/core/src/npysort/radixsort.c
    conv_template:> build/src.linux-x86_64-3.8/numpy/core/src/common/npy_partition.h
    conv_template:> build/src.linux-x86_64-3.8/numpy/core/src/npysort/selection.c
    conv_template:> build/src.linux-x86_64-3.8/numpy/core/src/common/npy_binsearch.h
    conv_template:> build/src.linux-x86_64-3.8/numpy/core/src/npysort/binsearch.c
    None - nothing done with h_files = ['build/src.linux-x86_64-3.8/numpy/core/src/common/npy_sort.h', 'build/src.linux-x86_64-3.8/numpy/core/src/common/npy_partition.h', 'build/src.linux-x86_64-3.8/numpy/core/src/common/npy_binsearch.h']
    building extension "numpy.core._dummy" sources
    Generating build/src.linux-x86_64-3.8/numpy/core/include/numpy/config.h
    C compiler: gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC
  
    compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.8 -c'
    gcc: _configtest.c
    _configtest.c:1:10: fatal error: Python.h: No such file or directory
        1 | #include <Python.h>
          |          ^~~~~~~~~~
    compilation terminated.
    failure.
    removing: _configtest.c _configtest.o
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-ldkko_7q/numpy/setup.py", line 443, in <module>
        setup_package()
      File "/tmp/pip-install-ldkko_7q/numpy/setup.py", line 435, in setup_package
        setup(**metadata)
      File "/tmp/pip-install-ldkko_7q/numpy/numpy/distutils/core.py", line 171, in setup
        return old_setup(**new_attr)
      File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 290, in run
        self.run_command('build')
      File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-ldkko_7q/numpy/numpy/distutils/command/build.py", line 47, in run
        old_build.run(self)
      File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-ldkko_7q/numpy/numpy/distutils/command/build_src.py", line 142, in run
        self.build_sources()
      File "/tmp/pip-install-ldkko_7q/numpy/numpy/distutils/command/build_src.py", line 159, in build_sources
        self.build_extension_sources(ext)
      File "/tmp/pip-install-ldkko_7q/numpy/numpy/distutils/command/build_src.py", line 316, in build_extension_sources
        sources = self.generate_sources(sources, ext)
      File "/tmp/pip-install-ldkko_7q/numpy/numpy/distutils/command/build_src.py", line 369, in generate_sources
        source = func(extension, build_dir)
      File "numpy/core/setup.py", line 430, in generate_config_h
        moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)
      File "numpy/core/setup.py", line 49, in check_types
        out = check_types(*a, **kw)
      File "numpy/core/setup.py", line 286, in check_types
        raise SystemError(
    SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
    ----------------------------------------
    ERROR: Failed building wheel for numpy
    Running setup.py clean for numpy
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ldkko_7q/numpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ldkko_7q/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
         cwd: /tmp/pip-install-ldkko_7q/numpy
    Complete output (10 lines):
    Running from numpy source directory.
  
    `setup.py clean` is not supported, use one of the following instead:
  
      - `git clean -xdf` (cleans all files)
      - `git clean -Xdf` (cleans all versioned files, doesn't touch
                          files that aren't checked into the git repo)
  
    Add `--force` to your command to use it anyway if you must (unsupported).
  
    ----------------------------------------
    ERROR: Failed cleaning build dir for numpy
  Failed to build numpy
  Installing collected packages: setuptools, wheel, Cython, numpy
      Running setup.py install for numpy: started
      Running setup.py install for numpy: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /usr/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ldkko_7q/numpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ldkko_7q/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-lu_pr29g/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-nfst1lxs/overlay --compile --install-headers /tmp/pip-build-env-nfst1lxs/overlay/include/python3.8/numpy
           cwd: /tmp/pip-install-ldkko_7q/numpy/
      Complete output (322 lines):
      Running from numpy source directory.
  
      Note: if you need reliable uninstall behavior, then install
      with pip instead of using `setup.py install`:
  
        - `pip install .`       (from a git repo or downloaded source
                                 release)
        - `pip install numpy`   (last NumPy release on PyPi)
  
  
      blas_opt_info:
      blas_mkl_info:
      customize UnixCCompiler
        libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
        NOT AVAILABLE
  
      blis_info:
      customize UnixCCompiler
        libraries blis not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
        NOT AVAILABLE
  
      openblas_info:
      customize UnixCCompiler
      customize UnixCCompiler
        libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
        NOT AVAILABLE
  
      atlas_3_10_blas_threads_info:
      Setting PTATLAS=ATLAS
      customize UnixCCompiler
        libraries tatlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
        NOT AVAILABLE
  
      atlas_3_10_blas_info:
      customize UnixCCompiler
        libraries satlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
        NOT AVAILABLE
  
      atlas_blas_threads_info:
      Setting PTATLAS=ATLAS
      customize UnixCCompiler
        libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
        NOT AVAILABLE
  
      atlas_blas_info:
      customize UnixCCompiler
        libraries f77blas,cblas,atlas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
        NOT AVAILABLE
  
      accelerate_info:
        NOT AVAILABLE
  
      /tmp/pip-install-ldkko_7q/numpy/numpy/distutils/system_info.py:690: UserWarning:
          Optimized (vendor) Blas libraries are not found.
          Falls back to netlib Blas library which has worse performance.
          A better performance should be easily gained by switching
          Blas library.
        self.calc_info()
      blas_info:
      customize UnixCCompiler
        libraries blas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
        NOT AVAILABLE
  
      /tmp/pip-install-ldkko_7q/numpy/numpy/distutils/system_info.py:690: UserWarning:
          Blas (http://www.netlib.org/blas/) libraries not found.
          Directories to search for the libraries can be specified in the
          numpy/distutils/site.cfg file (section [blas]) or by setting
          the BLAS environment variable.
        self.calc_info()
      blas_src_info:
        NOT AVAILABLE
  
      /tmp/pip-install-ldkko_7q/numpy/numpy/distutils/system_info.py:690: UserWarning:
          Blas (http://www.netlib.org/blas/) sources not found.
          Directories to search for the sources can be specified in the
          numpy/distutils/site.cfg file (section [blas_src]) or by setting
          the BLAS_SRC environment variable.
        self.calc_info()
        NOT AVAILABLE
  
      /bin/sh: svnversion: not found
      non-existing path in 'numpy/distutils': 'site.cfg'
      lapack_opt_info:
      lapack_mkl_info:
      customize UnixCCompiler
        libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
        NOT AVAILABLE
  
      openblas_lapack_info:
      customize UnixCCompiler
      customize UnixCCompiler
        libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
        NOT AVAILABLE
  
      openblas_clapack_info:
      customize UnixCCompiler
      customize UnixCCompiler
        libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
        NOT AVAILABLE
  
      flame_info:
      customize UnixCCompiler
        libraries flame not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
        NOT AVAILABLE
  
      atlas_3_10_threads_info:
      Setting PTATLAS=ATLAS
      customize UnixCCompiler
        libraries lapack_atlas not found in /usr/local/lib
      customize UnixCCompiler
        libraries tatlas,tatlas not found in /usr/local/lib
      customize UnixCCompiler
        libraries lapack_atlas not found in /usr/lib
      customize UnixCCompiler
        libraries tatlas,tatlas not found in /usr/lib
      customize UnixCCompiler
        libraries lapack_atlas not found in /usr/lib/
      customize UnixCCompiler
        libraries tatlas,tatlas not found in /usr/lib/
      <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
        NOT AVAILABLE
  
      atlas_3_10_info:
      customize UnixCCompiler
        libraries lapack_atlas not found in /usr/local/lib
      customize UnixCCompiler
        libraries satlas,satlas not found in /usr/local/lib
      customize UnixCCompiler
        libraries lapack_atlas not found in /usr/lib
      customize UnixCCompiler
        libraries satlas,satlas not found in /usr/lib
      customize UnixCCompiler
        libraries lapack_atlas not found in /usr/lib/
      customize UnixCCompiler
        libraries satlas,satlas not found in /usr/lib/
      <class 'numpy.distutils.system_info.atlas_3_10_info'>
        NOT AVAILABLE
  
      atlas_threads_info:
      Setting PTATLAS=ATLAS
      customize UnixCCompiler
        libraries lapack_atlas not found in /usr/local/lib
      customize UnixCCompiler
        libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
      customize UnixCCompiler
        libraries lapack_atlas not found in /usr/lib
      customize UnixCCompiler
        libraries ptf77blas,ptcblas,atlas not found in /usr/lib
      customize UnixCCompiler
        libraries lapack_atlas not found in /usr/lib/
      customize UnixCCompiler
        libraries ptf77blas,ptcblas,atlas not found in /usr/lib/
      <class 'numpy.distutils.system_info.atlas_threads_info'>
        NOT AVAILABLE
  
      atlas_info:
      customize UnixCCompiler
        libraries lapack_atlas not found in /usr/local/lib
      customize UnixCCompiler
        libraries f77blas,cblas,atlas not found in /usr/local/lib
      customize UnixCCompiler
        libraries lapack_atlas not found in /usr/lib
      customize UnixCCompiler
        libraries f77blas,cblas,atlas not found in /usr/lib
      customize UnixCCompiler
        libraries lapack_atlas not found in /usr/lib/
      customize UnixCCompiler
        libraries f77blas,cblas,atlas not found in /usr/lib/
      <class 'numpy.distutils.system_info.atlas_info'>
        NOT AVAILABLE
  
      lapack_info:
      customize UnixCCompiler
        libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/']
        NOT AVAILABLE
  
      /tmp/pip-install-ldkko_7q/numpy/numpy/distutils/system_info.py:1712: UserWarning:
          Lapack (http://www.netlib.org/lapack/) libraries not found.
          Directories to search for the libraries can be specified in the
          numpy/distutils/site.cfg file (section [lapack]) or by setting
          the LAPACK environment variable.
        if getattr(self, '_calc_info_{}'.format(lapack))():
      lapack_src_info:
        NOT AVAILABLE
  
      /tmp/pip-install-ldkko_7q/numpy/numpy/distutils/system_info.py:1712: UserWarning:
          Lapack (http://www.netlib.org/lapack/) sources not found.
          Directories to search for the sources can be specified in the
          numpy/distutils/site.cfg file (section [lapack_src]) or by setting
          the LAPACK_SRC environment variable.
        if getattr(self, '_calc_info_{}'.format(lapack))():
        NOT AVAILABLE
  
      /usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
        warnings.warn(msg)
      running install
      running build
      running config_cc
      unifing config_cc, config, build_clib, build_ext, build commands --compiler options
      running config_fc
      unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
      running build_src
      build_src
      building py_modules sources
      building library "npymath" sources
      get_default_fcompiler: matching types: '['gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor']'
      customize Gnu95FCompiler
      Could not locate executable gfortran
      Could not locate executable f95
      customize IntelFCompiler
      Could not locate executable ifort
      Could not locate executable ifc
      customize LaheyFCompiler
      Could not locate executable lf95
      customize PGroupFCompiler
      Could not locate executable pgfortran
      customize AbsoftFCompiler
      Could not locate executable f90
      Could not locate executable f77
      customize NAGFCompiler
      customize VastFCompiler
      customize CompaqFCompiler
      Could not locate executable fort
      customize IntelItaniumFCompiler
      Could not locate executable efort
      Could not locate executable efc
      customize IntelEM64TFCompiler
      customize GnuFCompiler
      Could not locate executable g77
      customize G95FCompiler
      Could not locate executable g95
      customize PathScaleFCompiler
      Could not locate executable pathf95
      customize NAGFORCompiler
      Could not locate executable nagfor
      don't know how to compile Fortran code on platform 'posix'
      C compiler: gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC
  
      compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.8 -c'
      gcc: _configtest.c
      gcc _configtest.o -o _configtest
      success!
      removing: _configtest.c _configtest.o _configtest.o.d _configtest
      C compiler: gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC
  
      compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.8 -c'
      gcc: _configtest.c
      _configtest.c:1:5: warning: conflicting types for built-in function 'exp'; expected 'double(double)' [-Wbuiltin-declaration-mismatch]
          1 | int exp (void);
            |     ^~~
      _configtest.c:1:1: note: 'exp' is declared in header '<math.h>'
        +++ |+#include <math.h>
          1 | int exp (void);
      gcc _configtest.o -o _configtest
      success!
      removing: _configtest.c _configtest.o _configtest.o.d _configtest
        adding 'build/src.linux-x86_64-3.8/numpy/core/src/npymath' to include_dirs.
      None - nothing done with h_files = ['build/src.linux-x86_64-3.8/numpy/core/src/npymath/npy_math_internal.h']
      building library "npysort" sources
        adding 'build/src.linux-x86_64-3.8/numpy/core/src/common' to include_dirs.
      None - nothing done with h_files = ['build/src.linux-x86_64-3.8/numpy/core/src/common/npy_sort.h', 'build/src.linux-x86_64-3.8/numpy/core/src/common/npy_partition.h', 'build/src.linux-x86_64-3.8/numpy/core/src/common/npy_binsearch.h']
      building extension "numpy.core._dummy" sources
      Generating build/src.linux-x86_64-3.8/numpy/core/include/numpy/config.h
      C compiler: gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC
      ----------------------------------------
     more error but not fill here

The errors imply you are missing a bunch of pre-reqs, including a fortran compiler.

You will need to go through the pre-requists for all the nodes you want to install and make sure you install all the libraries/tools they need before trying to install the nodes.

Doing this by hand in a shell attached to a container is probably not the best idea in the long term, because while you can commit the changes you make to the image, you would always need to apply them by hand again if you pull a new version of the Node-RED image.

You will do better making notes as you go then building a custom Dockerfile to apply all the changes on top of the Node-RED image.

Having said that you may make things easier for yourself by using a full blown distro based image rather something like Alpine as the docs for installing the pre-reqs will be better.

and as mentioned above - our custom-docker directory in the repo does include a debian variant which may be an easier place to start.