question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Numpy version incompatibility

See original GitHub issue

Code Sample, a copy-pastable example if possible

Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 13:35:33) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas as pd
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\SoftInstall\Python\lib\site-packages\pandas\__init__.py", line 31, in <module>
    from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib
  File "D:\SoftInstall\Python\lib\site-packages\pandas\_libs\__init__.py", line 3, in <module>
    from .tslibs import (
  File "D:\SoftInstall\Python\lib\site-packages\pandas\_libs\tslibs\__init__.py", line 3, in <module>
    from .conversion import localize_pydatetime, normalize_date
  File "__init__.pxd", line 918, in init pandas._libs.tslibs.conversion
ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 192 from PyObject

Problem description

Although Pandas 1.0.1 has a minimum requirement for numpy of 1.13.3 (see release notes of Pandas 1.0.0), it fails with numpy 1.15.4 (Python 3.6.7).

Problem is solved by upgrading numpy (version 1.18.1 works).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
mroeschkecommented, Jul 28, 2021

Sounds like this issue may be solved by upgrading to a newer numpy version, in which 1.3 did bump the dependency. Going to close, but happy to reopen if this continues to be an issue

0reactions
sebergcommented, Sep 3, 2020

Yeah, we now have the ctypedef class numpy.ufunc [object PyUFuncObject, check_size ignore]: “check_size ignore” flag in the .pyd, so the issue is fixed but would show up if you used a cython which did not include this when compiling, and then upgrade to a newer numpy version. Making sure you are using a newish cython will thus be sufficient.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pandas incompatible with numpy - Stack Overflow
In conda list, my numpy version is 1.19.1. I checked the above directory to find that it has only numpy 1.15.3 inside and...
Read more >
Solved: numpy incompatibility - Intel Communities
Solved: I've managed to end up with an incompatible environment. I'm guessing that some package is missing some restriction on the version of...
Read more >
NumPy 1.22.0 Release Notes
The Python versions supported in this release are 3.8-3.10, Python 3.7 has been dropped. Note that the Mac wheels are now based on...
Read more >
Pandas version advanced starting in Jan 2021: numpy is now ...
ERROR: pandas 1.2.0 has requirement numpy>=1.16.5, but you'll have numpy 1.16.4 which is incompatible. Here's the thing: ...
Read more >
Toolchain Roadmap — SciPy v1.9.3 Manual
SciPy takes a somewhat conservative approach, maintaining compatibility with ... The table shows the NumPy versions suitable for each major Python version.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found