PaddlePaddle / PaddleHub

Awesome pre-trained models toolkit based on PaddlePaddle. (400+ models including Image, Text, Audio, Video and Cross-Modal with Easy Inference & Serving)【安全加固,暂停交互,请耐心等待】
https://www.paddlepaddle.org.cn/hub
Apache License 2.0
12.74k stars 2.07k forks source link

bug::AttributeError: module 'paddle' has no attribute 'version' #2300

Closed Haeppypuppy closed 1 year ago

Haeppypuppy commented 1 year ago

when I install paddleHub import paddlehub as hub <AttributeError Traceback (most recent call last) in <cell line: 1>() ----> 1 import paddlehub as hub

8 frames /usr/local/lib/python3.10/dist-packages/paddlenlp/transformers/ernie_ctm/modeling.py in 33 ) 34 ---> 35 if compare_version(paddle.version.full_version, "2.2.0") >= 0: 36 # paddle.text.ViterbiDecoder is supported by paddle after version 2.2.0 37 from paddle.text import ViterbiDecoder

AttributeError: module 'paddle' has no attribute 'version'>

rainyfly commented 1 year ago

版本问题,可以参考下列方式安装: conda create -n py38 python==3.8 conda activate py38 python -m pip install paddlepaddle-gpu==2.5.1 -i https://pypi.tuna.tsinghua.edu.cn/simple pip install paddlehub==2.4.0