-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
软件环境
- paddlepaddle:2.6.2
- paddlepaddle-gpu: 非GPU
- paddlenlp: 2.6.1重复问题
- I have searched the existing issues
错误描述
使用paddlenlp运行依存句法分析时报错,提示LAC依赖没有找到,但是LAC已经安装了稳定复现步骤 & 代码
from paddlenlp import Taskflow
ddp = Taskflow("dependency_parsing", model="ddparser-ernie-gram-zh",use_pos=True)
运行之后,出现以下错误
Traceback (most recent call last):
File "D:\anaconda3\envs\py310\lib\site-packages\paddlenlp\taskflow\dependency_parsing.py", line 183, in init
from LAC import LAC
File "D:\anaconda3\envs\py310\lib\site-packages\LAC_init_.py", line 23, in
from .lac import LAC
File "D:\anaconda3\envs\py310\lib\site-packages\LAC\lac.py", line 28, in
import paddle.fluid as fluid
ModuleNotFoundError: No module named 'paddle.fluid'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "D:\anaconda3\envs\py310\lib\site-packages\paddlenlp\taskflow\taskflow.py", line 804, in init
self.task_instance = task_class(
File "D:\anaconda3\envs\py310\lib\site-packages\paddlenlp\taskflow\dependency_parsing.py", line 185, in init
raise ImportError("Please install the dependencies first, pip install LAC --upgrade")
ImportError: Please install the dependencies first, pip install LAC --upgrade