9.27-10.2报错整理

  1. 报错一:
    1. 错误信息:
      'tensorflow' has no attribute 'gfile'
    2. 解决:
       import tensorflow._api.v2.compat.v1 as tf
       tf.disable_v2_behavior()
  2. 报错二:
    1. 错误信息:
      error: subprocess-exited-with-error × python setup.py egg_info did not run successfully.
    2. 原因:python 版本与需要下载的package的版本不匹配
    3. 解决:使用anaconda重新创建一个虚拟环境,配置低版本的python(因为一般不匹配是因为要下载的版本过低)
  3. 报错三:
    1. 报错:only size-1 arrays can be converted to Python scalars
    2. 解决:将math.exp修改为np.exp
  4. 安装低版本torch失败过程记录:
    1. 报错1:

      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.
      2. 解析原因:应该是torch.0.2.0.post3版本无法直接通过pip进行安装,已下载whl,尝试使用whl进行安装

    2. 报错2:直接安装whl报错:
      1. 报错信息:
        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. 报错3:使用指令 'python -m pip install --upgrade pip' 之后报错
      1. 报错信息:PermissionError: [WinError 5] 拒绝访问。
      2. 尝试解决:以管理员身份运行cmd,并重新执行该指令pip版本并没有变化,再继续安装whl,报错2。(循环了,如果有成功安装了torch-0.2.0.post3-cp35-cp35m-manylinux1_x86_64.whl的朋友可以指导下如何正确安装吗?)
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值