Linux离线更新conda

 在使用服务器运行代码时,由于服务器只能通过本地访问,不能联网,所以只能通过在一台可以联网的主机上下载好配置文件,再上传到服务器的方式进行配置环境(Filezilla),配置conda环境是其中之一。

从官网下载conda安装包

https://docs.conda.io/en/latest/miniconda.html#linux-installershttps://docs.conda.io/en/latest/miniconda.html#linux-installers

放在原有的conda路径下/home/user_name/miniconda/

安装新的conda包

在这里如果直接执行安装命令

sh Miniconda3-py38_4.12.0-Linux-x86_64.sh

会有报错,因为miniconda3这个路径已经存在了,这时会有提示

ERROR: File or directory already exists: '/home/dlsijinghua/miniconda3'
If you want to update an existing installation, use the -u option.

所以要执行 -u 的更新命令:

bash Miniconda3-py38_4.12.0-Linux-x86_64.sh -u

最后更新完成

你可能感兴趣的:(linux,conda,python)