Skip to content Skip to sidebar Skip to footer

Ta-lib Installation Error: Must Use Python With Unicode Enabled

when I try to install ta-lib(a technical analysis library coded originally in C) for Python using a wrapper for Python and Cython, I get an error message saying 'Must use python wi

Solution 1:

Your Python binary was compiled with Unicode disabled (configure --enable_unicode=no). NumPy requires a Python build with Unicode support enabled.

You'll have to install one that does have it enabled (the default).

If you find your Python has Unicode enabled after all (run python, type print u'' and you get no errors), then the build system is failing to pick up the Python C headers from C:\Python27\include instead. Specifically, the pyconfig.h file could be missing:

$ grep -i unicode /usr/include/python2.6/pyconfig.h
   Include/unicodeobject.h). */
/* Define as the integral type used for Unicode representation. */#define PY_UNICODE_TYPE unsigned long/* Define as the size of the unicode type. */#define Py_UNICODE_SIZE 4/* Define if you want to have a Unicode type. */#define Py_USING_UNICODE 1
   supplied by Python itself. (see Include/unicodectype.h). */

Solution 2:

I'm not sure how much control you have over the code -- but trying to build my own code using numpy/ndarrayobject.h, the solution was to #include "Python.h" before including the ndarrayobject header.

Post a Comment for "Ta-lib Installation Error: Must Use Python With Unicode Enabled"