undefined symbol: PyUnicodeUCS2_FromString
Created by: BryceLuminary
我在干净的官方虚拟机里源码安装 paddlepaddle,有https://github.com/PaddlePaddle/Paddle/issues/9745 所述错误,经提醒直接从官网下载 .whl 文件直接安装,但仍有错误,烦请处理一下,谢谢!我的操作步骤是:
docker run -dit -v $PWD/paddle:/paddle --name paddle docker.paddlepaddlehub.com/paddle:latest-dev bash
git clone https://github.com/PaddlePaddle/Paddle.git
cmake .. -DWITH_GPU=OFF -DWITH_GOLANG=OFF -DWITH_STYLE_CHECK=ON -DCMAKE_INSTALL_PREFIX=$PWD/output
make; make install
wget paddlepaddle-0.11.0-cp27-cp27mu-linux_x86_64.whl
pip uninstall paddlepaddle pip install paddlepaddle-0.11.0-cp27-cp27mu-linux_x86_64.whl
python /paddle/Paddle/python/paddle/fluid/tests/test_cpp_reader.py
错误: Traceback (most recent call last): File "./test_cpp_reader.py", line 16, in import paddle.fluid as fluid File "/usr/local/lib/python2.7/dist-packages/paddle/fluid/init.py", line 17, in import framework File "/usr/local/lib/python2.7/dist-packages/paddle/fluid/framework.py", line 22, in from . import core ImportError: /usr/local/lib/python2.7/dist-packages/paddle/fluid/core.so: undefined symbol: PyUnicodeUCS2_FromString
经环境变量修改后故障才修复: export PYTHONPATH=/paddle/Paddle/build/python/