关于安装 tensorflow-directml 时报错解决方案
cmd输入:
pip install tensorflow-directml
报错信息:
ERROR: Could not find a version that satisfies the requirement tensorflow-directml (from versions: none)
ERROR: No matching distribution found for tensorflow-directml
如图
原因:
- python的版本不对,截止至2022年1月,tensorflow-directml 包还不支持Python3.7以上的版本,且只支持Python3.5、3.6和3.7
解决方法:
安装python3.7 到 python3.5之间的版本,并用新安装的版本的pip安装
若在Pycharm上安装tensorflow-directml时报错,出现如下图情况;
同理,检测python版本是否正确,切换到正确python版本下重新安装 tensorflow-directml 即可。