【发布时间】:2017-04-02 22:48:54
【问题描述】:
我正在尝试使用以下命令从 yaml 文件创建 conda 环境:
conda env create -f myenv.yml python=3
当我的 yaml 文件这样写时:
name: myenv
channels:
- conda-forge
dependencies:
- django=1.10.5
- pip:
- gunicorn==19.7.0
- psycopg2==2.6.2
效果很好。
当我的 yaml 文件这样写时(没有 conda-forge 包/通道):
name: myenv
dependencies:
- pip:
- gunicorn==19.7.0
- psycopg2==2.6.2
它会产生以下错误:
Traceback (most recent call last):
File "/home/myuser/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 573, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/home/myuser/anaconda3/lib/python3.6/site-packages/conda_env/cli/main_create.py", line 108, in execute
installer.install(prefix, pkg_specs, args, env)
File "/home/myuser/anaconda3/lib/python3.6/site-packages/conda_env/installers/pip.py", line 8, in install
pip_cmd = pip_args(prefix) + ['install', ] + specs
TypeError: unsupported operand type(s) for +: 'NoneType' and 'list'
我需要使用没有 conda-forge 包的第二个 yaml 示例。
有什么建议吗?
【问题讨论】: