sh 使用conda从requirements.txt安装Python依赖包。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 使用conda从requirements.txt安装Python依赖包。相关的知识,希望对你有一定的参考价值。

#
#  Original solution via StackOverflow:
#    http://stackoverflow.com/questions/35802939/install-only-available-packages-using-conda-install-yes-file-requirements-t
#

#
#  Install via `conda` directly.
#  This will fail to install all
#  dependencies. If one fails,
#  all dependencies will fail to install.
#
conda install --yes --file requirements.txt

#
#  To go around issue above, one can
#  iterate over all lines in the
#  requirements.txt file.
#
while read requirement; do conda install --yes $requirement; done < requirements.txt

以上是关于sh 使用conda从requirements.txt安装Python依赖包。的主要内容,如果未能解决你的问题,请参考以下文章

ubuntu sh脚本激活conda 虚拟环境

sh Conda修订版

sh Conda命令

sh conda_repo_add

sh 清洁所有conda包

sh 准备环境#conda #setup