Skip to content
Advertisement

How to enable unicode for Python on Fedora?

I am trying to compile MGTAXA on Fedora 23, but I get this error about python needs to be 2.2 or higher (2.7.10 is installed) and that unicode needs to be enabled.

Question

Can anyone tell me, what I need to do to enable unicode for Python in Fedora 23 and how to make it see that Python is at least 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]# 

Advertisement

Answer


‘andreyto-mgtaxa-8175a98’ : Create a “Fedora 23 Makefile” : $ mkdir build2 && cd build2/ && cmake ../

And then : $ make : No errors here, Fedora 23 – x86_64.

# make install : And you get /usr/local/bin/{ mgt-glm-build-icm, mgt-glm-build-fixed, mgt-glm-score-fixed, mgt-glm-simple-score }.


User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement