linux完全卸载python

1.卸载自动Python

# rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps

2删除残余文件

 # whereis python |xargs rm -frv

 

 

例如   python 3.6 安装带python3.6m

 ./configure --prefix=/usr/local/python3 --enable-shared CFLAGS=-fPIC
  make && make install 
 生成  (/usr/local/python3)  libpython3.6m.so和libpython3.6m.so.1.0
 
 ./configure --prefix=/usr/local/python3 --enable-optimizations --with-ssl  
  make && make install  
 生成  (/usr/local/python3)  libpython3.6m.a

 

ln -s /usr/local/python/bin/python3.6 /usr/bin/python3

ln -s /usr/local/python/bin/pip3 /usr/bin/pip3
 

 

你可能感兴趣的:(python)