根据gh指令,我们可以通过conda使用:conda install gh --channel conda-forge安装gh cli。我想知道是否有办法将它包含在environment.yml文件中?这样我就可以在设置conda环境时自动安装软件包。
name: conda_env
channels:
- defaults
dependencies:
- python>=3.8
- pip>=20.1.1我不知道在哪里将gh添加到environment.yml文件中。很明显,这不是一个pip包。
发布于 2022-01-21 06:48:25
将conda-forge添加到通道中,gh添加到依赖项中:
environment.yaml
name: conda_env
channels:
- conda-forge
- defaults
dependencies:
- python>=3.8
- pip>=20.1.1
- gh注意,在使用Conda使其优先于缺省值(因此是顺序)时,建议这样做。否则,就有可能遇到信道混合问题。这里可能不是问题,因为gh是一个独立的二进制文件,但值得注意。
https://stackoverflow.com/questions/70795622
复制相似问题