如何在 Fedora 上为 Python 启用 unicode?

How to enable unicode for Python on Fedora?

我正在尝试在 Fedora 23 上编译 MGTAXA,但我收到关于 python 需要 2.2 或更高版本(已安装 2.7.10)并且需要启用 unicode 的错误.

问题

谁能告诉我,我需要做什么才能在 Fedora 23 中为 Python 启用 unicode 以及如何让它看到 Python 至少是 2.2?

[root@5a86e481e3cd build]# make -f ../Makefile 

"BOOST_INC_DIR=/include"
mkdir -p /mgtaxa/build/.deps; /usr/bin/g++ -O3 -fPIC -g  -I/mgtaxa/include -I/include -I -I/usr/lib64/python2.7/site-packages/numpy/core/include -MM -o /mgtaxa/build/.deps/py_num_util.d /mgtaxa/src/py_num_util.cpp && cp /mgtaxa/build/.deps/py_num_util.d /mgtaxa/build/.deps/py_num_util.P && sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\$//' -e '/^$/ d' -e 's/$/ :/' < /mgtaxa/build/.deps/py_num_util.d >> /mgtaxa/build/.deps/py_num_util.P && rm /mgtaxa/build/.deps/py_num_util.d
In file included from /usr/include/boost/python/detail/prefix.hpp:13:0,
                 from /usr/include/boost/python/args.hpp:8,
                 from /usr/include/boost/python.hpp:11,
                 from /mgtaxa/include/mgtaxa/py_num_util.hpp:21,
                 from /mgtaxa/src/py_num_util.cpp:16:
/usr/include/boost/python/detail/wrap_python.hpp:78:2: error: #error Python 2.2 or higher is required for this version of Boost.Python.
 #error Python 2.2 or higher is required for this version of Boost.Python.
  ^
In file included from /usr/include/numpy/ndarraytypes.h:4:0,
                 from /usr/include/numpy/ndarrayobject.h:17,
                 from /usr/include/numpy/noprefix.h:9,
                 from /mgtaxa/include/mgtaxa/py_num_util.hpp:22,
                 from /mgtaxa/src/py_num_util.cpp:16:
/usr/include/numpy/npy_common.h:301:2: error: #error Must use Python with unicode enabled.
 #error Must use Python with unicode enabled.
  ^
../Makefile:287: recipe for target 'py_num_util.o' failed
make: *** [py_num_util.o] Error 1
[root@5a86e481e3cd build]# 

'andreyto-mgtaxa-8175a98' : 创建一个 "Fedora 23 Makefile" : $ mkdir build2 && cd build2/ && cmake ../

然后:$ make:这里没有错误,Fedora 23 - x86_64.

# make install :你得到 /usr/local/bin/{ mgt-glm-build-icm, mgt-glm-build-fixed, mgt-glm-score-fixed, mgt-glm-simple-score }.