我正试图在Fedora23上编译MGTAXA,但我得到一个关于python需要2.2或更高版本(已安装2.7.10)和unicode需要启用的错误。
问题
有谁能告诉我,在Fedora23中,我需要做些什么来为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 }
。
关于python - 如何在Fedora上为Python启用unicode?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/33876891/