How do i remove python 3.5 from ubuntu?

To list all python versions in default locations

ls /usr/bin/python*

To remove just python3 package

sudo apt-get remove python3.5

plus it's dependent packages

sudo apt-get remove --auto-remove python3.5

plus configuration and/or data files of python3

sudo apt-get purge python3.5

both configuration and/or data files of python3.5 and it's dependencies

sudo apt-get purge --auto-remove python3.5

How to install new version of python

sudo apt-get update

sudo apt-get install python3

Also, see https://docs.python-guide.org/starting/install3/linux/ or install python3.8 https://linuxize.com/post/how-to-install-python-3-8-on-ubuntu-18-04/

ModuleNotFoundError: No module named '_sqlite3'.

  • sudo apt-get install libsqlite3-dev
  • ./configure --enable-loadable-sqlite-extensions && make && sudo make install

I am trying to uninstall Python 3.5. I have tried this up till now:

sudo make clean
sudo make uninstall
sudo -n install

These commands don't remove Python 3.5 completely. I want to keep 3.4 as it is built in (Ubuntu 14.04). I want to specifically remove 3.5. Any suggestions?


Steps I used to install 3.5:

wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz
tar -xvf Python-3.5.0.tgz
cd Python-3.5.0
./configure
sudo make install

How do i remove python 3.5 from ubuntu?

asked Jun 26, 2016 at 17:24

How do i remove python 3.5 from ubuntu?

4

A manually installed Python-[any-version] has no uninstall. The only method is to delete the files.

Suggest : cd Python-3.5.0/ && sudo make install 2>&1 | tee install.log.txt

Analyze the install.log.txt, and decide if it is possible to delete the installed files, without disturbing the default python3.5 ( /usr/lib/python3.5, etc.) and python3 : /usr/lib/python3, etc.

answered Jun 26, 2016 at 20:18

How do i remove python 3.5 from ubuntu?

Knud LarsenKnud Larsen

2,9542 gold badges11 silver badges13 bronze badges

How do i remove python 3.5 from ubuntu?

When install Ubuntu package of Python come with some time your required will be deferent version for what you are looking for, this tutorial will guide you throw how to Remove existing python version and install python 3.5.2 on Ubuntu 16.04

o   Uninstall python

To remove just python package itself from Ubuntu 16.04 (Xenial Xerus) execute on terminal:

sudo apt-get remove python

o   Uninstall python and it’s dependent packages

To remove the python package and any other dependant package which are no longer needed from Ubuntu Xenial.

sudo apt-get remove --auto-remove python

o   Purging python

If you also want to delete configuration and/or data files of python from Ubuntu Xenial then this will work:

sudo apt-get purge python

To delete configuration and/or data files of python and it’s dependencies from Ubuntu Xenial then execute:

sudo apt-get purge --auto-remove python

·        How to Install Python 3.5.2 on Ubuntu

o   Install Required Packages

Use the following command to install prerequisites for Python before installing it.

sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

o   Download Python 3.5.2

Download Python using following command from python official site. You can also download latest version in place of specified below.

cd /usr/src
sudo wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz

Now extract the downloaded package.

sudo tar xzf Python-3.5.2.tgz

o   Compile Python Source

cd Python-3.5.2
sudo ./configure
sudo make altinstall

o   Check the Python Version

Check the latest version installed of python using below command

python3.5 -V

How do I uninstall Python 3.6 from Ubuntu?

“remove python 3.6 ubuntu 18.04” Code Answer's.
# Remove python2..
sudo apt purge -y python2.7-minimal..
# You already have Python3 but..
# don't care about the version..
sudo ln -s /usr/bin/python3 /usr/bin/python..
# Same for pip..

How do I remove multiple versions of Python in Ubuntu?

2 Answers.
1)Install python3.7 (you've done this already so lets proceed).
2)Add Python 3.6 & Python 3.7 to update-alternatives. sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1. ... .
3)Update Python 3 to point to Python 3.7 with this command. sudo update-alternatives --config python3..

How do I remove an existing version of Python?

Uninstalling Older Python Versions.
Go to Control Panel and select Add or Remove Programs..
Assuming you have an older version X.Y installed, scroll through the list of programs, and for each Python X.Y package that has been installed, select it in the list and click Remove..

How do I change Python from 3.6 to 3.8 Ubuntu?

How to upgrade to Python 3.8 on Ubuntu 18.04 LTS.
Step 1: Add the repository and update..
Step 2: Install the Python 3.8 package using apt-get..
Step 3: Add Python 3.6 & Python 3.8 to update-alternatives..
Step 4: Update Python 3 for point to Python 3.8..
Step 5: Test the version of python..