! https://zhuanlan.zhihu.com/p/639416152
解决方式:
直接上解决方式,需要知道原因的看后文。
直接安装 tensroflow,从 2022 年 12 月起 tensorflow-gpu 已经合并到 tensorflow 包中了
pip install tensorflow==2.12.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
这里使用清华源安装
报错原因
错误 1:setup.py 报错
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
尝试使用成功帖子中的方法
setuptools.extern.packaging.\_tokenizer.ParserSyntaxError: Expected end or semicolon (after name and no valid version specifier)
错误 2:未找到匹配的版本
明明参照别人成功地案例却不正确,这是因为 tensorflow-gpu 之前存在的版本已经被下架了。
根据https://pypi.org/project/tensorflow-gpu/给出的公告:
所以之前安装成功的博客都不用看了,这种大一统的方式简化了大家的工作量,也不会由之前那么多报错了。
- Tensorflow Tensorflow-gpu Tensorflow2 版本 办法tensorflow tensorflow-gpu tensorflow2版本 tensorflow-gpu tensorflow2 tensorflow-gpu tensorflow windows cudnn tensorflow2 tensorflow bert4keras 4keras tensorflow2 tensorflow深度 事实 tensorflow-gpu tensorflow服务器 教程 tensorflow2 tensorflow实战 指南 矩阵tensorflow2 tensorflow pytorch tensorflow-gpu tensorflow cudnn cuda