从GitHub上下载好项目,再打开Anaconda Prompt,一路cd到environment.yml所在的目录,然后
conda env create -f environment.yml
接下来报错:
WARNING: A space was detected in your requested environment path
‘D:\Program Files\miniconda3\envs\nerf’
Spaces in paths can sometimes be problematic.
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound: - imagemagick
environment.yml脚本:
# To run: conda env create -f environment.yml
name: nerf
channels:
- conda-forge
dependencies:
- python=3.7
- pip
- cudatoolkit=10.0
- tensorflow-gpu==1.15
- numpy
- matplotlib
- imageio
- imageio-ffmpeg
- configargparse
- imagemagick
修改environment.yml脚本:
- pip:下面的必须要有缩进(python)
# To run: conda env create -f environment.yml
name: nerf
channels:
- conda-forge
dependencies:
- python=3.7
- pip
- cudatoolkit=10.0
- numpy
- matplotlib
- imageio
- imageio-ffmpeg
- configargparse
- pip:
- imagemagick
- tensorflow-gpu==1.15
再次报错
如果有以下错误,多半是语法错误,回过头仔细检测environment.yml
>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
> ruamel_yaml.parser.ParserError: while parsing a block collection
in "<unicode string>", line 6, column 5:
- python=3.7
^ (line: 6)
expected <block end>, but found '?'
in "<unicode string>", line 14, column 5:
-pip:
^ (line: 14)
解决问题。
参考文章:
如何快速从GitHub下载文件https://blog.csdn.net/shuiyunxc/article/details/104645832/
https://blog.csdn.net/langjijianghu_123/article/details/80923293