• 主页
  • 课程

    关于课程

    • 课程归档
    • 成为一名讲师
    • 讲师信息
    同等学历教学

    同等学历教学

    免费
    阅读更多
  • 特色
    • 展示
    • 关于我们
    • 问答
  • 事件
  • 个性化
  • 博客
  • 联系
  • 站点资源
    有任何问题吗?
    (00) 123 456 789
    weinfoadmin@weinformatics.cn
    注册登录
    恒诺新知
    • 主页
    • 课程

      关于课程

      • 课程归档
      • 成为一名讲师
      • 讲师信息
      同等学历教学

      同等学历教学

      免费
      阅读更多
    • 特色
      • 展示
      • 关于我们
      • 问答
    • 事件
    • 个性化
    • 博客
    • 联系
    • 站点资源

      未分类

      • 首页
      • 博客
      • 未分类
      • conda 安装软件报错

      conda 安装软件报错

      • 发布者 weinfoadmin
      • 分类 未分类, 老俊俊的生信笔记
      • 日期 2021年9月10日
      • 评论 0评论

      感谢老俊俊的大力支持。我们会每日跟新,欢迎您关注老俊俊的生信笔记。

      conda 安装软件报错

      conda 隔一段时间不用,再打开安装什么软件时经常性的会无缘无故报错,最近需要安装总是有问题。

      $ conda install python=2
      Collecting package metadata (current_repodata.json): done
      Solving environment: failed with initial frozen solve. Retrying with flexible solve.
      Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
      Collecting package metadata (repodata.json): failed

      #
       >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

          Traceback (most recent call last):
            File "/root/miniconda3/lib/python3.9/site-packages/conda/core/subdir_data.py", line 371, in _load
              raw_repodata_str = fetch_repodata_remote_request(
            File "/root/miniconda3/lib/python3.9/site-packages/conda/core/subdir_data.py", line 808, in fetch_repodata_remote_request
              raise Response304ContentUnchanged()
          conda.core.subdir_data.Response304ContentUnchanged
      ... # 中间内容太多省略
      An unexpected error has occurred. Conda has prepared the above report.

      If submitted, this report will be used by core maintainers to improve
      future releases of conda.
      Would you like conda to send this report to the core maintainers?

      [y/N]: n

      No report sent. To permanently opt-out, use

          $ conda config --set report_errors false

      根据报错经验,很可能又是镜像源有问题了,有时候能安装上,但是总有几个大点的包会安装失败,那可能是网速问题,可以用手机 开个热点 试试。网上搜了好几个解决方法,终于找到一个能解决的!

      那就是把你的 condarc 文件里的镜像源全部换掉。

      # 切换到root目录
      $ cd
      $ pwd
      /root
      # 查看当前内容,condarc文件是隐藏文件
      $ ls -la
      drwx------ 17 root root  4096 Jun 27 15:09 .
      drwxr-xr-x 19 root root  4096 Jun 27 14:41 ..
      -rw-------  1 root root    61 Apr 26 19:15 .Xauthority
      -rw-------  1 root root 47424 Jun 27 14:43 .bash_history
      -rw-r--r--  1 root root  3718 Jun 27 14:45 .bashrc
      drwxr-xr-x  6 root root  4096 Apr 26 21:08 .cache
      drwxr-xr-x  2 root root  4096 Mar  7 22:15 .conda
      -rw-r--r--  1 root root   821 Jun 27 15:09 .condarc
      drwxr-xr-x  6 root root  4096 Apr  3 16:10 .config
      drwxr-xr-x  6 root root  4096 Mar 16 14:18 .cpan

      找到了 condarc 文件后用 vi 编辑器打开修改为以下内容:

      channels:

      - defaults
        show_channel_urls: true
        channel_alias: https://mirrors.tuna.tsinghua.edu.cn/anaconda
        default_channels:
      - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
      - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
      - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
      - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
      - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
        custom_channels:
        conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

      参考自:【报错】Anaconda Collecting package metadata (repodata.json): failed[1]

      $ vi .condarc
      channels:
        - defaults
      show_channel_urls: true
      channel_alias: https://mirrors.tuna.tsinghua.edu.cn/anaconda
      default_channels:
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
        - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
      custom_channels:
        conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
        simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

      然后保存退出,重新安装软件试一下:

      conda install python=2
      Collecting package metadata (current_repodata.json): done
      Solving environment: done

      #
      # Package Plan ##

        environment location: /root/miniconda3/envs/py2

        added / updated specs:
          - python=2


      The following packages will be downloaded:

          package                    |            build
          ---------------------------|-----------------
          ca-certificates-2021.5.25  |       h06a4308_1         112 KB  defaults
          certifi-2020.6.20          |     pyhd3eb1b0_3         155 KB  defaults
          openssl-1.1.1k             |       h27cfd23_0         2.5 MB  defaults
          python-2.7.18              |       h02575d3_0         9.8 MB  defaults
          ------------------------------------------------------------
                                                 Total:        12.6 MB
      ...
      Downloading and Extracting Packages
      python-2.7.18        | 9.8 MB    | ################################################################################################################### | 100%
      openssl-1.1.1k       | 2.5 MB    | ################################################################################################################### | 100%
      ca-certificates-2021 | 112 KB    | ################################################################################################################### | 100%
      certifi-2020.6.20    | 155 KB    | ################################################################################################################### | 100%
      Preparing transaction: done
      Verifying transaction: done
      Executing transaction: done
      $

      搞定!

      参考资料

      [1]

      【报错】Anaconda Collecting package metadata (repodata.json): failed: https://blog.csdn.net/xiangduixuexi/article/details/108831726

      欢迎小伙伴留言评论!

      点击我留言!

      今天的分享就到这里了,敬请期待下一篇!

      最后欢迎大家分享转发,您的点赞是对我的鼓励和肯定!

      如果觉得对您帮助很大,打赏一下吧!


      请关注“恒诺新知”微信公众号,感谢“R语言“,”数据那些事儿“,”老俊俊的生信笔记“,”冷🈚️思“,“珞珈R”,“生信星球”的支持!

      • 分享:
      作者头像
      weinfoadmin

      上一篇文章

      R Tips :match 函数
      2021年9月10日

      下一篇文章

      MetaProfile on Transcript
      2021年9月10日

      你可能也喜欢

      2-1675088548
      lncRNA和miRNA生信分析系列讲座免费视频课和课件资源包,干货满满
      30 1月, 2023
      9-1675131201
      如何快速批量修改 Git 提交记录中的用户信息
      26 1月, 2023
      8-1678501786
      肿瘤细胞通过改变CD8+ T细胞中的丙酮酸利用和琥珀酸信号来调控抗肿瘤免疫应答。
      7 12月, 2022

      留言 取消回复

      要发表评论,您必须先登录。

      搜索

      分类

      • R语言
      • TCGA数据挖掘
      • 单细胞RNA-seq测序
      • 在线会议直播预告与回放
      • 数据分析那些事儿分类
      • 未分类
      • 生信星球
      • 老俊俊的生信笔记

      投稿培训

      免费

      alphafold2培训

      免费

      群晖配置培训

      免费

      最新博文

      Nature | 单细胞技术揭示衰老细胞与肌肉再生
      301月2023
      lncRNA和miRNA生信分析系列讲座免费视频课和课件资源包,干货满满
      301月2023
      如何快速批量修改 Git 提交记录中的用户信息
      261月2023
      logo-eduma-the-best-lms-wordpress-theme

      (00) 123 456 789

      weinfoadmin@weinformatics.cn

      恒诺新知

      • 关于我们
      • 博客
      • 联系
      • 成为一名讲师

      链接

      • 课程
      • 事件
      • 展示
      • 问答

      支持

      • 文档
      • 论坛
      • 语言包
      • 发行状态

      推荐

      • iHub汉语代码托管
      • iLAB耗材管理
      • WooCommerce
      • 丁香园论坛

      weinformatics 即 恒诺新知。ICP备案号:粤ICP备19129767号

      • 关于我们
      • 博客
      • 联系
      • 成为一名讲师

      要成为一名讲师吗?

      加入数以千计的演讲者获得100%课时费!

      现在开始

      用你的站点账户登录

      忘记密码?

      还不是会员? 现在注册

      注册新帐户

      已经拥有注册账户? 现在登录

      close
      会员购买 你还没有登录,请先登录
      • ¥99 VIP-1个月
      • ¥199 VIP-半年
      • ¥299 VIP-1年
      在线支付 激活码

      立即支付
      支付宝
      微信支付
      请使用 支付宝 或 微信 扫码支付
      登录
      注册|忘记密码?