PaddleX icon indicating copy to clipboard operation
PaddleX copied to clipboard

安装paddlex报错,protobuf版本无法兼顾,怎么办?

Open xingbeibei opened this issue 2 years ago • 5 comments

安装时protobuf版本为:3.20.3,之后报错

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. paddlepaddle-gpu 2.4.1 requires protobuf<=3.20.0,>=3.1.0, but you have protobuf 3.20.3 which is incompatible.

然后我修改版本,变成3.20.0,出现下面的问题

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. onnx 1.13.0 requires protobuf<4,>=3.20.2, but you have protobuf 3.20.0 which is incompatible.

这两条根本无法兼顾,我应该怎么修改才能不报错?

环境

  1. PaddlePaddle版本:2.4.1 PaddleX的版本:2.1.0
  2. 操作系统:Windows
  3. Python版本:3.7.4
  4. CUDA:cuda_10.2.89_441.22_win10
  5. cuDNN:cudnn-10.2-windows10-x64-v7.6.5.32

xingbeibei avatar Jan 23 '23 13:01 xingbeibei

看起来是ONNX和paddlepaddle-gpu依赖的protobuf冲突,可以创建两个虚拟环境解决。

lailuboy avatar Jan 31 '23 03:01 lailuboy

  1. pip uninstall onnx
  2. pip install protobuf==3.20.0
  3. 根据visualdl报错提示下载onnx pip install onnx==(版本号)

另外:后面正常使用paddlex需要pip install filelock 有可能会报错No module named 'filelock'

bijiao1997 avatar Feb 10 '23 02:02 bijiao1997

pip uninstall onnx pip install protobuf=3.20.0 pip install onnx==1.12.0

https://github.com/onnx/onnx/blob/rel-1.12.0/requirements.txt : protobuf >= 3.12.2, <= 3.20.1 so, install onnx==1.12.0 would not have the conflict

iminsh avatar Mar 20 '23 10:03 iminsh

看起来是ONNX和paddlepaddle-gpu依赖的protobuf冲突,可以创建两个虚拟环境解决。 I don't think your solution is very good.

Mrfuhang avatar Mar 31 '23 03:03 Mrfuhang

any effective solutions from dev's? got the same error.

koted0 avatar May 20 '23 18:05 koted0