deepcs233 / jieba_fast

Use C Api and Swig to Speed up jieba 高效的中文分词库
MIT License
632 stars 75 forks source link

请问编译后的windows-python3版本确实可以运行吗? #17

Closed MoonKuma closed 5 years ago

MoonKuma commented 5 years ago

当前你编译后的版本里,有一个.pyd的文件,_jieba_fast_functions_py3.cp35-win_amd64.pyd 如果这样原样放到site-package下面的话,import时候会报错: “”“ Traceback (most recent call last): File "", line 1, in File "C:\Users\7q\Anaconda3\lib\site-packages\jieba_fast__init.py", line 16, in from . import finalseg File "C:\Users\7q\Anaconda3\lib\site-packages\jieba_fast\finalseg__init.py", line 12, in import _jieba_fast_functions_py3 as _jieba_fast_functions ModuleNotFoundError: No module named '_jieba_fast_functions_py3' ”“” 将文件名改为: _jieba_fast_functions_py3.pyd之后再次尝试import 此时报错: “”“ Traceback (most recent call last): File "", line 1, in File "C:\Users\7q\Anaconda3\lib\site-packages\jieba_fast\init__.py", line 16, in from . import finalseg File "C:\Users\7q\Anaconda3\lib\site-packages\jieba_fast\finalseg\init__.py", line 12, in import _jieba_fast_functions_py3 as _jieba_fast_functions ImportError: DLL load failed: 找不到指定的模块。 ”“” 我不太熟悉这种安装方式,以前都是偷懒anaconda的方法,是否是我操作出了问题?还是windows版本的问题

谢谢!

deepcs233 commented 5 years ago

自己测试过是可以的,但是我之前没有使用anaconda。你可以看一下anaconda对应的site-packages在哪里,把它放到对应的文件夹里。或者你就把windows/python3下的文件夹扔到site-packages里去,然后不使用conda,使用普通的python3