更新anaconda包

  • 升级安装python环境后, 把老的包重新安装回去.
ls -l /opt/anaconda3/lib/python3.7/site-packages/     | grep "\-info" | awk '{print $NF}' | awk -F'-' '{print $1}' | sort  > 37.txt
ls -l /opt/anaconda3_3.6/lib/python3.6/site-packages/ | grep "\-info" | awk '{print $NF}' | awk -F'-' '{print $1}' | sort  > 36.txt

# 未安装的package
cat 36.txt  37.txt  | sort  | uniq  -d  | cat 36.txt - | sort | uniq -u 


# cat 36.txt  37.txt  | sort  | uniq      > union.txt
# cat 36.txt  37.txt  | sort  | uniq  -u  > complement.txt
# cat 36.txt  37.txt  | sort  | uniq  -d  > intersection.txt

猜你喜欢

转载自www.cnblogs.com/bregman/p/10912761.html