I'm having trouble compiling AC extensions using Cython in Python 3. It is compiled and works well with Python 2.7, but Pyro 3.4 gets the following error when building with 3.4 (Anaconda distribution):
Python setup.py build_ext - Build_ext Building 'module' extension that runs on location gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototype -fPIC -Includes -i / home / user / anaconda / include / python3.4m -c module.cpp -o build / temp.linux-x86_64-3.4 / module.o cc1plus: WARNING: The command line option is valid for "-pro-prototype" ADA / C / OBJC but C ++ rawdata.c Pp: 'int __pyx_pf_7rawdata_13RawDataReader ___ cinit __ (' pyx_obj_7rawdata_RawDataReader *, PyObject *, int, int) 'in the function: rawdata.cpp: 852: Error:' PyString_Asstring 'was not declared in this scope error: Problem of exit of 'GCC' in position 1 failed
The problem is that my second module has been written for 3.4. 7 is not really an option.
Any thoughts on how to get around this?
So it is found that Python 3 is controlled in Ajman differently, so my The simplest solution for PyString_AsString (s)
to s.encode ('UTF-8')
No comments:
Post a Comment