Note that there are some explanatory texts on larger screens.

plurals
  1. POCython: Symbol not found: _PyCFunction_Check
    text
    copied!<p>I am trying to get the <a href="http://docs.cython.org/src/userguide/tutorial.html" rel="nofollow">basic Cython tutorial</a> to work. So I have</p> <p><code>hello.pyx</code>:</p> <pre><code>def say_hello_to(name): print("Hello %s!" % name) </code></pre> <p>And <code>setup.py</code>:</p> <pre><code>from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext ext_modules = [Extension("hello", ["hello.pyx"])] setup( name = 'Hello world app', cmdclass = {'build_ext': build_ext}, ext_modules = ext_modules ) </code></pre> <p>However, trying to compile I get this error:</p> <pre><code>$ python setup.py build_ext --inplace running build_ext failed to import Cython: dlopen(/usr/local/lib/python2.7/site-packages/Cython/Compiler/Scanning.so, 2): Symbol not found: _PyCFunction_Check Referenced from: /usr/local/lib/python2.7/site-packages/Cython/Compiler/Scanning.so Expected in: flat namespace in /usr/local/lib/python2.7/site-packages/Cython/Compiler/Scanning.so error: Cython does not appear to be installed </code></pre> <p>Cython <em>is</em> installed and <code>scanning.so</code> does appear to contain the symbol in question:</p> <pre><code>$ nm -gl /usr/local/lib/python2.7/site-packages/Cython/Compiler/Scanning.so | grep _PyCFunction_Check U _PyCFunction_Check </code></pre> <p>Any ideas? I'm on OS X 10.7.5 using homebrew python 2.7.3.</p> <p><strong>Edit:</strong> As pointed out by @bdash' comment below, <code>U _PyCFunction_Check</code> actually means that <code>_PyCFunction_Check</code> is undefined.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload