python - 即使满足包要求,也解决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。
解决方案
所以显然这就是原因:
如果环境是在与目标计算机不同的平台上导出的,则可能会发生此问题。例如,在上面的输出中,environment.yaml 有包:pyyaml==3.12=py27ha7932d0_1,并且这个只在 osx-64 上可用,但是 OP 试图在 linux 机器上创建环境,它赢了'在 linux-64 子目录中找不到包。康达在这里没有任何问题。请探索 conda env 导出的 --no-builds 选项,这将放松对包构建的约束。
从这里。
推荐阅读
- cmake - CMake:无法运行 MSBuild 命令
- geoip - 如何更正 maxmind GeoIP 位置?
- grails - Grails Shiro 插件,未经授权的重定向缺少上下文路径
- ios - Unsupported Architectures,.app/Frameworks/...的可执行文件包含 Flutter ios 上不支持的架构 [x86_64]
- postgresql - 创建一个 postgresql 触发器函数来更新 Linestring 几何列
- rust - 如何计算两个 chrono::DateTime 之间的持续时间?
- bash - Bash:查找特定文件并从名称中删除最后 5 个字符
- c++ - c ++:错误:获取临时地址[-fpermissive]
- javascript - 在 HTML 网页中通过 Javascript 列出存储在 Google Drive 中的文件
- asp.net-mvc - 区域 MVC 中 API 的路由