PaddleX
PaddleX copied to clipboard
安装paddlex报错,protobuf版本无法兼顾,怎么办?
安装时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.
这两条根本无法兼顾,我应该怎么修改才能不报错?
环境
- PaddlePaddle版本:2.4.1 PaddleX的版本:2.1.0
- 操作系统:Windows
- Python版本:3.7.4
- CUDA:cuda_10.2.89_441.22_win10
- cuDNN:cudnn-10.2-windows10-x64-v7.6.5.32
看起来是ONNX和paddlepaddle-gpu依赖的protobuf冲突,可以创建两个虚拟环境解决。
- pip uninstall onnx
- pip install protobuf==3.20.0
- 根据visualdl报错提示下载onnx pip install onnx==(版本号)
另外:后面正常使用paddlex需要pip install filelock 有可能会报错No module named 'filelock'
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
看起来是ONNX和paddlepaddle-gpu依赖的protobuf冲突,可以创建两个虚拟环境解决。 I don't think your solution is very good.
any effective solutions from dev's? got the same error.