首页 > 解决方案 > 即使满足包要求,也解决anaconda enviroment.yml中的ResolvePackageNotFound错误?

问题描述

我正在尝试遵循此(草图识别)的步骤。我必须运行命令conda env create -f anaconda/environment.yml。我专门为此命令安装了 anaconda,但出现此错误

(base) [duke@void paper-implementation]$ conda env create -f anaconda/environment.yml
Collecting package metadata (repodata.json): done
Solving environment: failed

ResolvePackageNotFound: 
  - freetype==2.8=h12048fb_1
  - readline==7.0=hc1231fa_4
  - pip==9.0.1=py35h33ce766_4
  - libffi==3.2.1=h475c297_4
  - python==3.5.4=he720263_23
  - wheel==0.30.0=py35h5c0b906_1
  - numpy==1.14.0=py35h8a80b8c_1
  - libedit==3.1=hb4e282d_0
  - sqlite==3.22.0=h3efe00b_0
  - hdf5==1.8.18=h017327d_1
  - openssl==1.0.2n=hdbc3d79_0
  - tbb==4.3_20141023=0
  - mkl==2018.0.1=hfbd8650_4
  - libgfortran==3.0.1=h93005f0_2
  - libcxxabi==4.0.1=hebd6815_0
  - ca-certificates==2017.08.26=ha1e5d58_0
  - pillow==5.0.0=py35hfcce615_0
  - scipy==1.0.0=py35h8b35106_0
  - tk==8.6.7=h35a86e2_3
  - jpeg==9b=he5867d9_2
  - xz==5.2.3=h0278029_2
  - zlib==1.2.11=hf3cbc9b_2
  - libcxx==4.0.1=h579ed51_0
  - intel-openmp==2018.0.0=h8158457_8
  - libtiff==4.0.9=h0dac147_0
  - matplotlib==2.0.2=py35ha43f773_1
  - scikit-learn==0.19.1=py35h2b554eb_0
  - ncurses==6.0=hd04f020_2

(base) [duke@void paper-implementation]$ pip3 install scikit-learn ncurses
Requirement already satisfied: scikit-learn in /usr/lib/python3.6/site-packages (0.20.2)
Collecting ncurses
  Could not find a version that satisfies the requirement ncurses (from versions: )
No matching distribution found for ncurses
(base) [duke@void paper-implementation]$ pip3 install scikit-learn 
Requirement already satisfied: scikit-learn in /usr/lib/python3.6/site-packages (0.20.2)

我正在使用 Linux。

标签: pythonconda

解决方案


所以显然这就是原因:

如果环境是在与目标计算机不同的平台上导出的,则可能会发生此问题。例如,在上面的输出中,environment.yaml 有包:pyyaml==3.12=py27ha7932d0_1,并且这个只在 osx-64 上可用,但是 OP 试图在 linux 机器上创建环境,它赢了'在 linux-64 子目录中找不到包。康达在这里没有任何问题。请探索 conda env 导出的 --no-builds 选项,这将放松对包构建的约束。

这里


推荐阅读