无法使用 yml 文件在 conda 中创建环境

时间:2021-01-26 08:40:13

标签: python anaconda conda

我正在尝试使用 yml 文件和 conda 创建一个环境。但是创建环境失败。

YML 文件:

name: respro
channels:
- defaults
dependencies:
- jupyter
- matplotlib=2.0.2
- numpy=1.13.1
- pandas=0.20.3
- python=3.5.4
- scikit-learn=0.19.0
- scipy==1.1.0
- seaborn=0.9.0
- pip:
 - tensorflow==1.15.0
 - tensorboard==1.15.0

创建命令

conda env create -f respro.yml

控制台:

$ conda env create -f respro.yml
Warning: you have pip-installed dependencies in your environment file, but you do not list pip itself as one of your conda dependencies.  Conda may not use the correct pip to install your packages, and they may end up in the wrong place.  Please add an explicit pip dependency.  I'm adding one for you, but still nagging you.
Collecting package metadata (repodata.json): done
Solving environment: done
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(700): An error occurred while installing package 'defaults::ipykernel-4.10.0-py35_0'.
Rolling back transaction: done

LinkError: post-link script failed for package defaults::ipykernel-4.10.0-py35_0
location of failed script: C:\Users\Username\.conda\envs\respro\Scripts\.ipykernel-post-link.bat
==> script messages <==
<None>
==> script output <==
stdout:
stderr:
return code: 1

()

请帮忙解决这个问题。试图寻找失败的原因,但没有弄清楚原因。

0 个答案:

没有答案