Ubuntu18.04 python2.7 安装tensorflow-1.0.1
- 安装tensorflow-1.0.1 CPU版本
pip install tensorflow==1.0.1
报错信息:
Collecting protobuf>=3.1.0
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/6c/be/4e32d02bf08b8f76bf6e59f2a531690c1e4264530404501f3489ca975d9a/protobuf-4.21.0-py2.py3-none-any.whl (164 kB)
ERROR: Package 'protobuf' requires a different Python: 2.7.18 not in '>=3.7'
解决方法
//单独安装所要求的protobuf版本
pip install protobuf==3.1.0
在重新输入命令
pip install tensorflow==1.0.1
即成功安装tensorflow-1.0.1的cpu版本
2. 安装tensorflow-1.0.1 GPU版本
pip install tensorflow-gpu==1.0.1
遇到上述同样问题,同样操作即可