# Error numpy.ndarray size changed, may indicate binary incompatibility, Tutorial part 2

**URL:** <https://brian.discourse.group/t/error-numpy-ndarray-size-changed-may-indicate-binary-incompatibility-tutorial-part-2/400>\
**Category:** Support\
**Created:** [5 June 2021 05:44 UTC](https://brian.discourse.group/t/error-numpy-ndarray-size-changed-may-indicate-binary-incompatibility-tutorial-part-2/400 "2021-06-05T05:44:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mstimberg](https://yyz2.discourse-cdn.com/free1/user_avatar/brian.discourse.group/mstimberg/32/11_2.png) [@mstimberg](https://brian.discourse.group/u/mstimberg)\
**Post date:** [7 June 2021 09:18 UTC](https://brian.discourse.group/t/error-numpy-ndarray-size-changed-may-indicate-binary-incompatibility-tutorial-part-2/400/2 "2021-06-07T09:18:50Z")

</div>

This situtation can arise when you do non-default installations and update packages. From your error, it seems you have an installed version of Brian, and one in the directory where you run the code (`brian2/synapses/...`). Concretely, if I’m not mistaken, at some point our Cython implementation of the `SpikeQueue` mechanism was compiled (which happens automatically when you run `pip install` for example), and at a later point `numpy` was _downgraded_ so that is no longer binary-compatible with the `numpy` version that was in place when the `SpikeQueue` was compiled. When we ship compiled packages (with `conda`, or in the upcoming version with wheels), we handle this by compiling against the oldest supported version, which is forward-compatible with all newer versions.  
Long story short, the easiest solution would be probably to remove your Brian2 installation and install it again, or to upgrade numpy to a version at least as new as the one when you installed Brian2 originally. If you prefer a less “brute-force” solution and want to use locally downloaded Brian2 sources, running `python setup.by build_ext --inplace` in the Brian2 source directory should probably fix the issue as well.

---

_[View the full topic](https://brian.discourse.group/t/error-numpy-ndarray-size-changed-may-indicate-binary-incompatibility-tutorial-part-2/400)._
