3

I have found out that on my PC, a certain method is represented as <cyfunction <lambda> at 0x06DD02A0>, while on a CentOS server, it's <cyfunction lambda1 at 0x1df3050>. I believe this is the cause for a very obscure downstream error with a different package.

Why is it different? What is its meaning? Can I turn one to the other?

Details: I see this when looking at pandas.algos._return_false. Both PC and server has python 2.7.6, same version of pandas (0.14.1), and cython 0.20.2. The PC is running Win 7, server is CentOS 6.5.

Korem
  • 11,383
  • 7
  • 55
  • 72

1 Answers1

3

Pandas ship with their Cython files precompiled against Cython 0.17.2. The <lambda> variant is newer than that, so was probably compiled against the system's Cython version.

You should probably avoid depending on this. It's not even consistent! Errors, for example, tend to use the lambdaN form even on Cython 0.20.2!

If you have to depend on this, standardise on a version: either use Pandas' precompiled sources everywhere or compile them yourself everywhere.

In order to compile Pandas with the system Python, run python setup.py clean to remove the prebuilt .c files.

Veedrac
  • 58,273
  • 15
  • 112
  • 169