anaconda 安装第三方库总是失败

2022-07-09 18:24:14 +08:00
 amiwrong123

大佬们,求助呀。

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 。

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

636 次点击
所在节点    程序员
10 条回复
r6cb
2022-07-09 18:29:48 +08:00
用 pip 装看看
imn1
2022-07-09 19:01:01 +08:00
https
不用加那么多 channel ,找不到再加

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

我是主要用 pip ,遇到编译失败的才使用 conda-force
imn1
2022-07-09 19:03:43 +08:00
补充:翻墙要添加这个域名 anaconda.com
ugvfpdcuwfnh
2022-07-09 19:20:00 +08:00
fq 用官方源啊!为啥用清华源?
wwqgtxx
2022-07-09 19:58:01 +08:00
https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/
明明官方有配置方法,为啥非要用这些奇奇怪怪的配置
amiwrong123
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
2022-07-09 21:00:43 +08:00
@ugvfpdcuwfnh #4
fp 是什么意思呀?
当初用清华,是觉得清华的,在国外会快一点吧😂
那官方源应该是什么网址呀😂
raycool
2022-07-10 00:12:41 +08:00
说明 conda 源里面没有 ocrmypdf 吧
用 pip 安装
wwqgtxx
2022-07-10 07:32:17 +08:00
@amiwrong123 confa install -c conda-forge ocrmypdf
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/

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/865141

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX