- 报错一:
- 错误信息:
'tensorflow' has no attribute 'gfile'
- 解决:
import tensorflow._api.v2.compat.v1 as tf tf.disable_v2_behavior()
- 错误信息:
- 报错二:
- 错误信息:
error: subprocess-exited-with-error × python setup.py egg_info did not run successfully.
- 原因:python 版本与需要下载的package的版本不匹配
- 解决:使用anaconda重新创建一个虚拟环境,配置低版本的python(因为一般不匹配是因为要下载的版本过低)
- 错误信息:
- 报错三:
- 报错:only size-1 arrays can be converted to Python scalars
- 解决:将math.exp修改为np.exp
- 安装低版本torch失败过程记录:
-
报错1:
-
报错信息:
Could not find a version that satisfies the requirement torch==0.2.0.post3 (from -r .\requirements.txt (line 4)) (from versions: )No matching distribution found for torch==0.2.0.post3 (from -r .\requirements.txt (line 4)) You are using pip version 9.0.1, however version 22.2.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
-
解析原因:应该是torch.0.2.0.post3版本无法直接通过pip进行安装,已下载whl,尝试使用whl进行安装
-
- 报错2:直接安装whl报错:
- 报错信息:
torch-0.2.0.post3-cp35-cp35m-manylinux1_x86_64.whl is not a supported wheel on this platform. You are using pip version 9.0.1, however version 22.2.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
- 报错信息:
- 报错3:使用指令 'python -m pip install --upgrade pip' 之后报错
- 报错信息:PermissionError: [WinError 5] 拒绝访问。
- 尝试解决:以管理员身份运行cmd,并重新执行该指令pip版本并没有变化,再继续安装whl,报错2。(循环了,如果有成功安装了torch-0.2.0.post3-cp35-cp35m-manylinux1_x86_64.whl的朋友可以指导下如何正确安装吗?)
-
9.27-10.2报错整理
最新推荐文章于 2024-06-07 14:14:26 发布