lancopku / pkuseg-python

pkuseg多领域中文分词工具; The pkuseg toolkit for multi-domain Chinese word segmentation
MIT License
6.51k stars 984 forks source link

ModuleNotFoundError: No module named 'pkuseg.feature_extractor' #142

Open jswxzmw opened 3 years ago

jswxzmw commented 3 years ago

您好,我刚刚下载了pkuseg,并尝试跑一下样例,发现直接import pkuseg会报错: ModuleNotFoundError: No module named 'pkuseg.feature_extractor' 不知这是不是feature_extractor是.pyx格式的原因;

我又尝试了在import pkuseg之前,import pyximport pyximport.install(),但这也会报错: ImportError: Building module pkuseg.inference failed: ["distutils.errors.CompileError: command 'gcc' failed with exit status 1\n"]

pkuseg 0.0.25 MacOS 10.15.4

TestNLP commented 3 years ago

请问这个问题解决了吗

TestNLP commented 3 years ago

我也遇到这种问题了

PeterPanWF commented 2 years ago

您好,我刚刚下载了pkuseg,并尝试跑一下样例,发现直接import pkuseg会报错: ModuleNotFoundError: No module named 'pkuseg.feature_extractor' 不知这是不是feature_extractor是.pyx格式的原因;

我又尝试了在import pkuseg之前,import pyximport pyximport.install(),但这也会报错: ImportError: Building module pkuseg.inference failed: ["distutils.errors.CompileError: command 'gcc' failed with exit status 1\n"]

pkuseg 0.0.25 MacOS 10.15. 我说win10,写了个setup.py 编译后可以import。 链接:https://blog.csdn.net/duan_zhihua/article/details/83547929

resuscitateocean commented 1 year ago

我也是,怎么解决??

a0000001 commented 1 year ago

我也中了,怎麼解决?

RayLei commented 1 year ago

21年的问题现在还在。。。

PeterPanWF commented 6 months ago

可以自行编译 python3 setup.py build python3 setup.py install

lcyyyyyyyyyyy commented 6 months ago

@.***,本次回复为系统自动回复!