murrayo / yape

yet another pButtons extractor
MIT License
11 stars 7 forks source link

docker image broken #24

Open casep opened 3 years ago

casep commented 3 years ago

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 ?

murrayo commented 3 years ago

Hi, yes. Needs to be looked at. I have a new requirements.txt, will test and advise.

Regards, MO

From: casep @.> Reply to: murrayo/yape @.> Date: Wednesday, 17 March 2021 at 02:05 To: murrayo/yape @.> Cc: Subscribed @.> Subject: [murrayo/yape] docker image broken (#24)

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

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 "", line 1030, in _gcd_import

File "", line 1007, in _find_and_load

File "", line 972, in _find_and_load_unlocked

File "", line 228, in _call_with_frames_removed

File "", line 1030, in _gcd_import

File "", line 1007, in _find_and_load

File "", line 986, in _find_and_load_unlocked

File "", line 680, in _load_unlocked

File "", line 790, in exec_module

File "", line 228, in _call_with_frames_removed

File "/src/yape/yape/init.py", line 2, in

from .main import yape2, parse_args

File "/src/yape/yape/main.py", line 17, in

from yape.plotpbuttons import mgstat, vmstat, iostat, perfmon, sard, monitor_disk, saru

File "/src/yape/yape/plotpbuttons.py", line 4, in

import matplotlib

File "/usr/local/lib/python3.9/site-packages/matplotlib/init.py", line 205, in

_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 ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/murrayo/yape/issues/24, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACMNUSGIY2ISGHDJS7G5WADTD56UXANCNFSM4ZI26FGA.