• 请不要在回答技术问题时复制粘贴 AI 生成的内容
amiwrong123
V2EX  ›  程序员

anaconda 安装第三方库总是失败

  •  
  •   amiwrong123 · Jul 9, 2022 · 1978 views
    This topic created in 1578 days ago, the information mentioned may be changed or developed.

    大佬们,求助呀。

    Windows 环境。已经搞了半天了。目前.condarc 里的内容已经为:

    ssl_verify: true
    show_channel_urls: true
    
    channels:
      - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
      - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64
      - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
      - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
      - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2
      - http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
      - defaults
    

    网上说,一定是 http ,不是 https 。所以内容里都是 http 。

    上面两条试了都不好使,以及开着翻墙软件的组合,也不好使。

    10 replies  •  2022-07-10 23:48:56 +08:00
    r6cb
    r6cb
    Jul 9, 2022
    1
    用 pip 装看看
    imn1
    imn1
    Jul 9, 2022
    2
    https
    不用加那么多 channel ,找不到再加

    非必要不装 anaconda ,因为预装包太多,分析依赖时可以转圈一小时(有洋大人反馈 4 小时,真有耐心)
    装 miniconda ,再自己配需要的包

    我是主要用 pip ,遇到编译失败的才使用 conda-force
    imn1
    imn1
    Jul 9, 2022
    3
    补充:翻墙要添加这个域名 anaconda.com
    ugvfpdcuwfnh
    ugvfpdcuwfnh
    Jul 9, 2022 via Android
    4
    fq 用官方源啊!为啥用清华源?
    wwqgtxx
    wwqgtxx
    Jul 9, 2022
    5
    https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
    明明官方有配置方法,为啥非要用这些奇奇怪怪的配置
    amiwrong123
    amiwrong123
    OP
    Jul 9, 2022
    6
    @wwqgtxx #5
    用了清华官方配置,然后也会报错。

    (base) C:\Users\dashen>conda install ocrmypdf
    Solving environment: failed

    PackagesNotFoundError: The following packages are not available from current channels:

    - ocrmypdf

    Current channels:

    - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
    - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
    - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/win-64
    - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/noarch
    - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/win-64
    - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/noarch
    amiwrong123
    amiwrong123
    OP
    Jul 9, 2022
    7
    @ugvfpdcuwfnh #4
    fp 是什么意思呀?
    当初用清华,是觉得清华的,在国外会快一点吧😂
    那官方源应该是什么网址呀😂
    raycool
    raycool
    Jul 10, 2022
    8
    说明 conda 源里面没有 ocrmypdf 吧
    用 pip 安装
    wwqgtxx
    wwqgtxx
    Jul 10, 2022❤️1
    9
    @amiwrong123 confa install -c conda-forge ocrmypdf
    Jakarta
    Jakarta
    Jul 10, 2022
    10
    conda search 默认搜索的是 default 通道,如果要搜索的包不在这个通道里,需要指定搜索的通道,比如 confa install -c conda-forge ocrmypdf 。
    见文档 https://docs.anaconda.com/anaconda/user-guide/tasks/using-repositories/ 。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2800 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 13:51 · PVG 21:51 · LAX 05:51 · JFK 08:51
    ♥ Do have faith in what you're doing.