D:\tool\anaconda3\envs\ernie-cpu\lib\site-packages_distutils_hack__init.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
File "D:/lenovo/python-project/paddlehub_ernie_emotion_analysis/finetune_ernie.py", line 2, in
import paddlehub as hub
File "D:\tool\anaconda3\envs\ernie-cpu\lib\site-packages\paddlehub__init__.py", line 54, in
from paddlehub.compat.task.text_generation_task import TextGenerationTask
File "D:\tool\anaconda3\envs\ernie-cpu\lib\site-packages\paddlehub\compat\task\text_generation_task.py", line 22, in
from paddle.fluid.layers import RNNCell, LSTMCell, rnn, BeamSearchDecoder, dynamic_decode
ImportError: cannot import name 'RNNCell' from 'paddle.fluid.layers' (D:\tool\anaconda3\envs\ernie-cpu\lib\site-packages\paddle\fluid\layers\init__.py)
D:\tool\anaconda3\envs\ernie-cpu\lib\site-packages_distutils_hack__init.py:33: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.") Traceback (most recent call last): File "D:/lenovo/python-project/paddlehub_ernie_emotion_analysis/finetune_ernie.py", line 2, in
import paddlehub as hub
File "D:\tool\anaconda3\envs\ernie-cpu\lib\site-packages\paddlehub__init__.py", line 54, in
from paddlehub.compat.task.text_generation_task import TextGenerationTask
File "D:\tool\anaconda3\envs\ernie-cpu\lib\site-packages\paddlehub\compat\task\text_generation_task.py", line 22, in
from paddle.fluid.layers import RNNCell, LSTMCell, rnn, BeamSearchDecoder, dynamic_decode
ImportError: cannot import name 'RNNCell' from 'paddle.fluid.layers' (D:\tool\anaconda3\envs\ernie-cpu\lib\site-packages\paddle\fluid\layers\ init__.py)
我用python3.7 paddlehub2.5.0