book icon indicating copy to clipboard operation
book copied to clipboard

_path.so: undefined symbol: PyUnicodeUCS4_AsASCIIString

Open fty8788 opened this issue 9 years ago • 3 comments

error: _path.so: undefined symbol: PyUnicodeUCS4_AsASCIIString, when i run train.py.

python train.py I0720 16:25:50.394904 16263 Util.cpp:166] commandline: --use_gpu=False --trainer_count=1 I0720 16:25:50.401638 16263 GradientMachine.cpp:85] Initing parameters.. I0720 16:25:50.401674 16263 GradientMachine.cpp:92] Init parameters done. Traceback (most recent call last): File "train.py", line 50, in main() File "train.py", line 42, in main paddle.reader.shuffle(uci_housing.train(), buf_size=500), File "/home/yanchunwei/third_party/paddle_env/python27/lib/python2.7/site-packages/paddle/v2/dataset/uci_housing.py", line 85, in train load_data(download(URL, 'uci_housing', MD5)) File "/home/yanchunwei/third_party/paddle_env/python27/lib/python2.7/site-packages/paddle/v2/dataset/uci_housing.py", line 66, in load_data feature_range(maximums[:-1], minimums[:-1]) File "/home/yanchunwei/third_party/paddle_env/python27/lib/python2.7/site-packages/paddle/v2/dataset/uci_housing.py", line 42, in feature_range import matplotlib.pyplot as plt File "/home/yanchunwei/third_party/paddle_env/paddle_box/lib/python2.7/site-packages/matplotlib/pyplot.py", line 29, in import matplotlib.colorbar File "/home/yanchunwei/third_party/paddle_env/paddle_box/lib/python2.7/site-packages/matplotlib/colorbar.py", line 32, in import matplotlib.artist as martist File "/home/yanchunwei/third_party/paddle_env/paddle_box/lib/python2.7/site-packages/matplotlib/artist.py", line 15, in from .transforms import (Bbox, IdentityTransform, TransformedBbox, File "/home/yanchunwei/third_party/paddle_env/paddle_box/lib/python2.7/site-packages/matplotlib/transforms.py", line 39, in from matplotlib._path import (affine_transform, count_bboxes_overlapping_bbox, ImportError: /home/yanchunwei/third_party/paddle_env/paddle_box/lib/python2.7/site-packages/matplotlib/_path.so: undefined symbol: PyUnicodeUCS4_AsASCIIString

fty8788 avatar Jul 20 '17 08:07 fty8788

重新编译下Python试试,加上以下参数:

./configure --enable-unicode=ucs4

wanghaoshuang avatar Jul 20 '17 08:07 wanghaoshuang

When built with --enable-unicode=ucs4:

>>> import sys 
>>> print sys.maxunicode 
1114111

When built with --enable-unicode=ucs2:

>>> import sys 
>>> print sys.maxunicode 
65535

from: https://stackoverflow.com/questions/1446347/how-to-find-out-if-python-is-compiled-with-ucs-2-or-ucs-4

wanghaoshuang avatar Jul 20 '17 08:07 wanghaoshuang

您好,此issue在近一个月内暂无更新,我们将于今天内关闭。若在关闭后您仍需跟进提问,可重新开启此问题,我们将在24小时内回复您。因关闭带来的不便我们深表歉意,请您谅解~感谢您对PaddlePaddle的支持! Hello, this issue has not been updated in the past month. we will close it today for the sake of other user’s experience. If you still need to follow up on this question after closing, please feel free to reopen it. In that case, we will get back to you within 24 hours. We apologize for the inconvenience caused by the closure and thank you so much for your support of PaddlePaddle Group!

shanyi15 avatar Aug 15 '18 09:08 shanyi15