This was solved with a quick comment, but posted as an answer for the sake of giving a bit more detail...
The very short answer is to replace all instances of python-config
for python3-config
or python3.4-config
.
Unnecessary detail follows
OP was trying to use a Pyrex module in Python 3 (this isn't especially clear from the question), and hence rebuilding it in Cython is a sensible approach to take, since Cython was originally based on Pyrex.
Cython generates code that should compile to work in Python 2 or 3, depending on which headers are included. python-config
generates relevant compiler/linker options for the default version of Python on the system which at the time of writing is typically Python 2 (on my system it includes -I/usr/include/python2.7 -I/usr/include/x86_64-linux-gnu/python2.7
). Therefore it builds the module for Python 2. Using the python3.4-config
ensures that the right version is included.
In the changeover from Python 2 to Python 3 the function called when C modules are imported was changed from init<modulename>
to PyInit_<modulename>
, presumably to help ensure that you can only import modules built for the correct version. Therefore when the module is built with Python 2 it only creates initfuzzy
, and therefore fails to find PyInit_fuzzy
on import.