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了

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章