PaddlePaddle/PaddleHub

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

Haeppypuppy opened this issue · 1 comments

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'>

版本问题,可以参考下列方式安装:
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