Docker problem: ValueError: numpy.ufunc has the wrong size, try recompiling.
See original GitHub issuewhen trying to start japonicus (using Docker) I get this error:
ValueError: numpy.ufunc has the wrong size, try recompiling. Expected 192, got 216
full copy+paste from my terminal
$ docker run --rm japonicus
Traceback (most recent call last):
File "/opt/japonicus/japonicus-run", line 4, in <module>
import japonicus
File "/opt/japonicus/japonicus/__init__.py", line 3, in <module>
from .japonicus import *
File "/opt/japonicus/japonicus/japonicus.py", line 9, in <module>
from .evolution_generations import gekko_generations
File "/opt/japonicus/japonicus/evolution_generations.py", line 8, in <module>
import promoterz
File "/opt/japonicus/promoterz/__init__.py", line 11, in <module>
from .import webServer
File "/opt/japonicus/promoterz/webServer/__init__.py", line 3, in <module>
from .import core
File "/opt/japonicus/promoterz/webServer/core.py", line 7, in <module>
import dash
File "/usr/local/lib/python3.6/site-packages/dash/__init__.py", line 1, in <module>
from .dash import Dash # noqa: F401
File "/usr/local/lib/python3.6/site-packages/dash/dash.py", line 23, in <module>
import plotly
File "/usr/local/lib/python3.6/site-packages/plotly/__init__.py", line 31, in <module>
from plotly import (plotly, dashboard_objs, graph_objs, grid_objs, tools,
File "/usr/local/lib/python3.6/site-packages/plotly/plotly/__init__.py", line 10, in <module>
from . plotly import (
File "/usr/local/lib/python3.6/site-packages/plotly/plotly/plotly.py", line 32, in <module>
from _plotly_utils.basevalidators import CompoundValidator, is_array
File "/usr/local/lib/python3.6/site-packages/_plotly_utils/basevalidators.py", line 25, in <module>
pd = import_module('pandas')
File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.6/site-packages/pandas/__init__.py", line 25, in <module>
from pandas import hashtable, tslib, lib
File "pandas/src/numpy.pxd", line 865, in init pandas.hashtable (pandas/hashtable.c:38368)
ValueError: numpy.ufunc has the wrong size, try recompiling. Expected 192, got 216
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
numpy.ufunc has the wrong size, try recompiling. even with ...
I am doing this in docker building pandas in alpine and run into the same issue and it JUST popped up (Dec 27th...
Read more >ValueError: numpy.ufunc has the wrong size, try recompiling ...
As the above, we could fix this problem in different ways, a) manually install the numpy 1.14.0 before the requirements.txt file, I have ......
Read more >numpy.ufunc has the wrong size, try recompiling.I use python3 ...
Coding example for the question numpy.ufunc has the wrong size, try recompiling.I use python3.6 under OpenBSD6.4,however,import pandas failed-Pandas,Python.
Read more >numpy.ufunc has the wrong size, try recompiling" 解决方法
出现这个问题的原因是:numpy版本和scikit-learn版本不搭配。解决方法:升级numpy即可:pip install -U numpy.
Read more >NumPy User Guide
NumPy arrays have a fixed size at creation, unlike Python lists (which ... _UFuncOutputCastingError: Cannot cast ufunc 'add' output from␣.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey, this last message is it running inside docker (composed with gekko)? Then it is working. Ok, I’m updating to this latest numpy, and dash also. This additional dash stuff like core-components is now installed automatically by dash (thank god) so just removed from
requirements.txt
.The pandas error has no side effects I think, it is optional for dash. Pandas version is likely to be unmatched with numpy’s at this point. I think japonicus does not use pandas, dodged it just to avoid complications on docker…
I mean this
https://github.com/Gab0/japonicus/blob/master/docker-compose.yaml