Linux下快速安装Anaconda

我们有时候往往会部署很多台PC上的Python环境,有很多重复的操作,为了减少我们的重复操作。分享一个很有利的工具 expect

具体脚本如下

#!/usr/bin/expect
#set the timeout
set timeout -1
#set the varables
set pwd 123

#start the proces
spawn bash Anaconda3-5.3.1-Linux-x86_64.sh
expect ">>>" { send "\ndddddddd"}
send "ddddddd"
expect ">>>" { send "yes\n" }
expect ">>>" { send "yes\n" }
expect ">>>" { send "\n" }
expect ">>>" { send "yes\n" }
expect ":" { send "123\n" }

interact

然后将这个写成一个脚本,install

chmod +x install 

./install

这里的123 为系统登录密码 换为自己的,

具体的一些指令解释请自行百度。这样的话,就可以做到快速无干预的安装Anaconda了

猜你喜欢

转载自blog.csdn.net/ewqapple/article/details/86558797
今日推荐