python - 如何在 Fedora 上为 Python 启用 unicode?

标签 python linux unicode fedora

我正在尝试编译 MGTAXA在 Fedora 23 上,但我收到有关 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-固定,mgt-glm-simple-score


关于python - 如何在 Fedora 上为 Python 启用 unicode?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33876891/

相关文章:

python - 过滤一行代码并仅显示某些列

python - 未实现错误: Cast string to float is not supported

c - 绑定(bind)服务器套接字: : Address already in use. UDP C编程时出错

java - 带有 unicode 换行符的注释语句

delphi 2009 unicode + ansi问题

python - 使用权重文件离线加载keras resnet50模型失败

Python 保存文件

php - 提高 yii 中的 sqlite 性能

linux - fork 与线程

c++ - SHGetFolderPath 返回带有问号的路径