MO EST
MO EST

Reputation: 11

numpy.ufunc has the wrong size, try recompiling.I use python3.6 under OpenBSD6.4,however,import pandas failed

I installed python3.6 under OpenBSDd6.4 for data analysis(is it a good idea?) Since Anaconda is not working under OpenBSD, I install pip to manage python package. I use pkg_add -v python to install python3.6.6

pip install pandas

the code above bring me the newest pandas version 0.23.4 and numpy 1.15.4. when I use the import pandas,the wrong message comes out.

Python 3.6.6 (default, Oct 11 2018, 16:49:21) 
[GCC 4.2.1 Compatible OpenBSD Clang 6.0.0 (tags/RELEASE_600/final)] on openbsd6
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/pandas/__init__.py", line 26, in <module>
    from pandas._libs import (hashtable as _hashtable,
  File "/usr/local/lib/python3.6/site-packages/pandas/_libs/__init__.py", line 4, in <module>
    from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime
  File "__init__.pxd", line 872, in init pandas._libs.tslib
ValueError: numpy.ufunc has the wrong size, try recompiling. Expected 112, got 124
>>> 

I check the location and version of numpy with command,

>>> import numpy
>>> numpy.__file__
'/usr/local/lib/python3.6/site-packages/numpy/__init__.py'

>>> numpy.version.version
'1.15.4'

I google some resolution like,

pip uninstall pandas
pip uninstall numpy
pip install pandas -U

but failed.

pip install --upgrade --force-reinstall pandas

above command,failed.

https://stackoverflow.com/questions/53904157/numpy-ufunc-has-the-wrong-size-try-recompiling-even-with-the-latest-pandas-and

above url failed.

Would you mind give me a hint on how to solve this probelms? Is it a good choice to use OpenBSD as a data analysis platform? Thank you.

Upvotes: 1

Views: 1557

Answers (1)

S.Bao
S.Bao

Reputation: 311

I had the same issue with numpy 1.14.5, I solved it with installing numpy 1.16.5

pip3.4 install numpy==1.16.5

Upvotes: 1

Related Questions