解决 no module name _sqllite3 手动卸载python并更新

yum install sqlite-devel

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

whereis python |xargs rm -frv

whereis python

cd /home/source

wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz

tar xf Python-3.6.5.tgz 


cd Python-3.6.5

mkdir /usr/local/python3.6.5

./configure --prefix=/usr/local/python3.6.5 --with-threads --enable-shared --with-zlib=/usr/include

make && make install

ln  /usr/local/python3.6.5/bin/python3.6 /usr/bin/python


cp /usr/local/python3.6.5/lib/libpython3.6m.so.1.0 /usr/lib

/sbin/ldconfig -v


[root@lsw-centos65 Python-3.6.5]# python -V
Python 3.6.5

[root@lsw-centos65 Python-3.6.5]# pip --version
pip 9.0.3 from /usr/local/python3.6.5/lib/python3.6/site-packages (python 3.6)


ref

posted on 2021-05-07 02:34  BionExit  阅读(13)  评论(0编辑  收藏  举报

导航