Uninstall and re-install Python 3 on Ubuntu 20.04 lts.
- Table of contents
- Uninstall Python3
- Install a new version of python
- ModuleNotFoundError: No module named '_sqlite3'.
ls /usr/bin/python*
sudo apt-get remove python3.5
ATTENTION! The next part of the process might delete the ubuntu GUI, use this command to re-install it.
sudo apt install ubuntu-desktop
sudo apt-get remove --auto-remove python3.5
sudo apt-get purge python3.5
sudo apt-get purge --auto-remove python3.5
sudo apt-get update
sudo apt-get install python3
Verify the installation.
python3
You should see something like the following.
Python 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
sudo apt-get install libsqlite3-dev
./configure --enable-loadable-sqlite-extensions && make && sudo make install