超實用安裝python3
1.下載安裝包:wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tar.xz
2.解壓:tar -xvJf Python-3.7.1.tar.xz
3.進入到解壓好的文件夾下:cd Python-3.7.1
4.添加配置,執行configure: ./configure
5.開始安裝:make && make install
6.查看是否安裝成功:./python -V,此時語法只能在當前文件目錄下使用。顯示出版本號就為成功
7.安裝完成之后建立一個軟鏈接方便使用:ln -s ./python /usr/bin/python3
8.完成之后就可以在任意目錄下使用 python3 -V 這個命令查看當前版本號。
超實用卸載python3:
1、卸載python3
rpm -qa|grep python3|xargs rpm -ev --allmatches --nodeps 卸載pyhton3
2、whereis python3 |xargs rm -frv 刪除所有殘余文件
成功卸載!
3、whereis python 查看現有安裝的python