pycharm配置bert环境:Flag --task_name must have a value other问题与Please use tf.compat.v1.app.run instead问题

项目场景:

环境:win10+pycharm社区版+anaconda3,配置bert环境,tensorflow1.14/1.13

在做情感分析项目时,要用到bert,在用anaconda prompt配置好bert虚拟环境后,出现了大量bug。

使用的安装命令:
conda create -n bert python=3.7
conda activate bert
conda install tensorflow==1.14
conda deactivate


问题描述及解决

主要出现了三个bug:

1.numpy包版本过高;

解决方法:

conda uninstall numpy
conda install numpy==1.16.4

2.配置编译参数错误;

报错:
flag --task_name=None: Flag --task_name must have a value other than None.
报错原因:
pycharm配置bert环境:Flag --task_name must have a value other问题与Please use tf.compat.v1.app.run instead问题_第1张图片

#这是配置运行参数时parameters项内容,这样写会报错

--task_name=MRPC \   			
--do_train=true \  
--do_eval=true \   
--data_dir=../glue/glue_data/MRPC \  
--vocab_file=.

你可能感兴趣的:(环境安装,pycharm,bert,python,tensorflow,virtualenv)