Skip to content

docker image broken #24

Description

@casep

Hi,
After rebuilding the image it no longer works

$ docker container run yape2
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
  File "/usr/local/bin/yape", line 33, in <module>
    sys.exit(load_entry_point('yape', 'console_scripts', 'yape')())
  File "/usr/local/bin/yape", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/src/yape/yape/__init__.py", line 2, in <module>
    from .main import yape2, parse_args
  File "/src/yape/yape/main.py", line 17, in <module>
    from yape.plotpbuttons import mgstat, vmstat, iostat, perfmon, sard, monitor_disk, saru
  File "/src/yape/yape/plotpbuttons.py", line 4, in <module>
    import matplotlib
  File "/usr/local/lib/python3.9/site-packages/matplotlib/__init__.py", line 205, in <module>
    _check_versions()
  File "/usr/local/lib/python3.9/site-packages/matplotlib/__init__.py", line 190, in _check_versions
    from . import ft2font
ImportError: numpy.core.multiarray failed to import

I think the problem is due to the Dockerfile running

RUN pip install --upgrade pip && \
    pip install --no-cache-dir Cython numpy pandas matplotlib pytz gitchangelog pre-commit black pystache bokeh PyYAML pillow setuptools_scm setuptools

which results in numpy 1.20.1 installed, but then setup.py is hard to "numpy==1.17.2", resulting in numpy unistalled

Found existing installation: numpy 1.20.1
    Uninstalling numpy-1.20.1:
      Successfully uninstalled numpy-1.20.1

This is not the only hard restrictions, similar happens for pandas and bokeh.

Shouldn't it be numpy>=1.17.2 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions