V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
amiwrong123
V2EX  ›  程序员

anaconda 安装第三方库总是失败

  •  
  •   amiwrong123 · 2022-07-09 18:24:14 +08:00 · 590 次点击
    这是一个创建于 628 天前的主题,其中的信息可能已经有所发展或是发生改变。

    大佬们,求助呀。

    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 条回复    2022-07-10 23:48:56 +08:00
    r6cb
        1
    r6cb  
       2022-07-09 18:29:48 +08:00
    用 pip 装看看
    imn1
        2
    imn1  
       2022-07-09 19:01:01 +08:00
    https
    不用加那么多 channel ,找不到再加

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

    我是主要用 pip ,遇到编译失败的才使用 conda-force
    imn1
        3
    imn1  
       2022-07-09 19:03:43 +08:00
    补充:翻墙要添加这个域名 anaconda.com
    ugvfpdcuwfnh
        4
    ugvfpdcuwfnh  
       2022-07-09 19:20:00 +08:00 via Android
    fq 用官方源啊!为啥用清华源?
    wwqgtxx
        5
    wwqgtxx  
       2022-07-09 19:58:01 +08:00
    https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
    明明官方有配置方法,为啥非要用这些奇奇怪怪的配置
    amiwrong123
        6
    amiwrong123  
    OP
       2022-07-09 20:59:38 +08:00
    @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
        7
    amiwrong123  
    OP
       2022-07-09 21:00:43 +08:00
    @ugvfpdcuwfnh #4
    fp 是什么意思呀?
    当初用清华,是觉得清华的,在国外会快一点吧😂
    那官方源应该是什么网址呀😂
    raycool
        8
    raycool  
       2022-07-10 00:12:41 +08:00
    说明 conda 源里面没有 ocrmypdf 吧
    用 pip 安装
    wwqgtxx
        9
    wwqgtxx  
       2022-07-10 07:32:17 +08:00   ❤️ 1
    @amiwrong123 confa install -c conda-forge ocrmypdf
    Jakarta
        10
    Jakarta  
       2022-07-10 23:48:56 +08:00
    conda search 默认搜索的是 default 通道,如果要搜索的包不在这个通道里,需要指定搜索的通道,比如 confa install -c conda-forge ocrmypdf 。
    见文档 https://docs.anaconda.com/anaconda/user-guide/tasks/using-repositories/
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   954 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 21:11 · PVG 05:11 · LAX 14:11 · JFK 17:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.