Terminal not working and not able to fix it either

Asked by Pooja Saxena

Hi,
I really do not know if its a bug, I'm affected by it since yesterday and have tried everything available on internet to fix it. However, nothing seems to be working and everything is halted because of it. :(

Yesterday I installed python3.8, after few trial error it seemed to be working and manage to install tensorflow as well. However, in the afternoon I noticed that I broke the default python settings of my system and now many basic (and must to have) are not working, for example, Terminal is not opening, system setting is not working.

I went to tty mode (ctrl+atl+f2) and tried fixing it myself, did not succeed sadly. as I really can not copy paste anything, I got a screenshot of the situation of python. If you need any further info, I would be more than happy ti provide.

If some experienced person able to help me, I would be truly grateful.

Thanks a million,
pooja

system info:
Ubuntu 16.04.7 LTS
Laptop : Thinkpad, X1 carbon

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Pooja Saxena
Solved:
Last query:
Last reply:
Revision history for this message
Colin Watson (cjwatson) said :
#1

This is a support request rather than a bug, so I'm converting it to a question and moving it to the Ubuntu distribution rather than Launchpad itself.

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

What exactly have you done to install python3.8 on Ubuntu 16.04?
This combination is not supported by Ubuntu.

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#3

@Manfred: I needed to setup tensorflow 2.1 test-environment using PyCharm, so had to have python3.8. After trying many options, I basically installed it from binary.
The process was tedious and hence on the way while playing with 'alternatives' I ended up screwing my complete python setup.

So far, I made python2.7 working again via this post https://askubuntu.com/questions/565438/deleted-the-python-binary-and-cant-recover-using-apt-get-what-can-i-do

However, the fix is not working for other broken packages pyclean, py3compile, py3-virtualenv.

 ***************
apt-get download python2.7-minimal ## at least this package is necessary
sudo touch /usr/bin/python2.7 && sudo chmod +x /usr/bin/python2.7
sudo dpkg --unpack python2.7-minimal*

*************************

Many Thanks,

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#4

The current error message is following in order to install needed packages (python3-compile etc) [1]

Just found this post stating the same error, trying to make sense out of it. (finger-crossed)

[1]
*********************
---
from: can't read /var/mail/glob
from: can't read /var/mail/os
from: can't read /var/mail/os.path
/usr/bin/py3clean: 31: /usr/bin/py3clean: Syntax error: word unexpected
(expecting ")")
---
/usr/bin/py3compile: 33: /usr/bin/py3compile: Syntax error: word unexpected
(expecting ")")
---

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#5
Revision history for this message
Manfred Hampl (m-hampl) said :
#6

1. First suggestion:
Do a clean new installation (effort needed of course depends on the amount of customization that you have done so far and the amount of data that need to be backed up and restored).

2. Ideas for repair:
How many concurrent python installations are there now?
Maybe it is possible to remove the manually installed python3.8 version and revive the python 3 version from Ubuntu, such that the system is working again.

3. Eventually boot a live system and re-install the python2 and python3 packages with a chroot as shown in https://help.ubuntu.com/community/LiveCdRecovery#Update_Failure

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#7

Hi Manfred,
thanks for your quick reply.
I was trying to work on your 2 idea, the status could be seen here https://hackmd.io/Sw2MlJc5RCK78XC_2jDW3Q?both

1 idea is unfortuantely not possible, as I installed my official windows in VM within my ubuntu.
thanks, trying the 3 idea.

Beste Grüße

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

Let's try step by step:

The postinst script of python3-minimal fails with strange error messages.
Digging into that script the only command that I see is py3compile which should come from the python3-minimal package that is just being installed (in /usr/bin/py3compile) and thus should work - unless there is another py3compile executable interfering.

What is the output of

which py3compile
sudo updatedb
locate py3compile

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#9

Hi Manfred,
Thanks for your Willingens to help me and give it a try.
Here are the output, that you asked for.

$ which py3compile
/usr/bin/py3compile

$ sudo updatedb
$
$ locate py3compile
/snap/core/10823/usr/bin/py3compile
/snap/core/10823/usr/share/debhelper/autoscripts/postinst-py3compile
/snap/core/10859/usr/bin/py3compile
/snap/core/10859/usr/share/debhelper/autoscripts/postinst-py3compile
/snap/core18/1988/usr/bin/py3compile
/usr/bin/py3compile
/usr/share/debhelper/autoscripts/postinst-py3compile
/usr/share/man/man1/py3compile.1.gz

In addition, I posted the error that I received when I start tty3 on my laptop here https://hackmd.io/Sw2MlJc5RCK78XC_2jDW3Q?both

Best Regards

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

What output do you receive for

file /usr/bin/py3compile
sudo py3compile -p python3-minimal /usr/share/python3/

The lsb_release script is python3 syntax, so changing the first line to python2 cannot work, but you might try #!/usr/bin/python3.5

Do you need snaps on that system?

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#11

here are the outputs:

$ file /usr/bin/py3compile
/usr/bin/py3compile: a /usr/bin/python3 script, UTF-8 Unicode text executable

$ sudo py3compile -p python3-minimal /usr/share/python3/
// no output, command ran fine.

The lsb_release script is python3 syntax, so changing the first line to python2 cannot work, but you might try #!/usr/bin/python3.5

Surprisingly, no matter which python version I write in /usr/bin/lsb_release, I receive the same error. Unless untill it require some additional compiling to notice the change in python version. Just changed it to python3.5, and the same error '!/usr/bin/python3.5: not found from: cant read /var/mail/optparse'

Best Regards,

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#12

sorry, the last answer:
No, I do not need snaps..I do not even know, what its for..

Revision history for this message
Manfred Hampl (m-hampl) said :
#13

Now try again

sudo dpkg --configure -a

What output do you receive now?

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#14
Revision history for this message
Manfred Hampl (m-hampl) said :
#15

The very first very small step forward - python3-minimal is installed.

The problem with the other packages is different, they are "in a very bad inconsistent state"

Try:
sudo apt install --reinstall python3-pip python3-virtualenv virtualenv -f

If this works, it is fine, but if this fails, then proceed as follows:

download the files (e.g. with wget)
https://launchpad.net/ubuntu/+archive/primary/+files/python3-pip_8.1.1-2ubuntu0.6_all.deb
https://launchpad.net/ubuntu/+archive/primary/+files/python3-virtualenv_15.0.1+ds-3ubuntu1.1_all.deb
https://launchpad.net/ubuntu/+archive/primary/+files/virtualenv_15.0.1+ds-3ubuntu1.1_all.deb

and re-install them with

sudo dpkg -i python3-pip_8.1.1-2ubuntu0.6_all.deb python3-virtualenv_15.0.1+ds-3ubuntu1.1_all.deb virtualenv_15.0.1+ds-3ubuntu1.1_all.deb

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#16

Hi Manfred,

'sudo apt' did not manage to install them,
however, the deb packages seems to be good via deb installation. The output is here: https://hackmd.io/Sw2MlJc5RCK78XC_2jDW3Q?both

ummm, out of curiosity I tried to start my terminal, no success sadly..I wonder what else it could be missing?

Best Regards,

Revision history for this message
Manfred Hampl (m-hampl) said :
#17

Ok, the broken packages seem to be repaired.

What output do you now receive for

sudo dpkg --audit
sudo apt update
sudo apt full-upgrade
lsb_release -crid

(don't expect another reply from me within the next 10 hours)

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#18

here are the output :
https://hackmd.io/Sw2MlJc5RCK78XC_2jDW3Q?both

Thanks for the heads up :)

Revision history for this message
Manfred Hampl (m-hampl) said :
#19

apt install is working again, but there are several configuration errors in your package management:

1. Err 403 Forbidden for PPA jonathonf/python-3.6

You have to remove this PPA from your list of repositories
grep jonathonf/python-3.6 /etc/apt/sources.list /etc/apt/sources.list.d/*.list
and either remove the lines or the whole file

2. NO_PUBKEY and KEYEXPIRED

Issue the commands

sudo apt-key adv --keyserver:keyserver.ubuntu.com BA6932366A755776 04EE7237B7D453EC 51716619E084DAB9
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -

3. lsb_release

What output do you receive for

python3 /usr/bin/lsb_release -a
head -n 3 /usr/bin/lsb_release

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#20

Hi Manfred,
Please find here the outputs:

pooja@X1-Carbon-6:/etc/apt/sources.list.d$ sudo apt-key adv --keyserver:keyserver.ubuntu.com BA6932366A755776 04EE7237B7D453EC 51716619E084DAB9
Executing: /tmp/tmp.vWVbwYqF38/gpg.1.sh --keyserver:keyserver.ubuntu.com
BA6932366A755776
04EE7237B7D453EC
51716619E084DAB9
gpg: invalid option "--keyserver:keyserver.ubuntu.com"

pooja@X1-Carbon-6:/etc/apt/sources.list.d$ sudo apt-key adv --keyserver keyserver.ubuntu.com BA6932366A755776 04EE7237B7D453EC 51716619E084DAB9
Executing: /tmp/tmp.uhTPba6Buc/gpg.1.sh --keyserver
keyserver.ubuntu.com
BA6932366A755776
04EE7237B7D453EC
51716619E084DAB9
gpg: WARNING: no command supplied. Trying to guess what you mean ...

pooja@X1-Carbon-6:/etc/apt/sources.list.d$ wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
OK

pooja@X1-Carbon-6:/etc/apt/sources.list.d$ python3 /usr/bin/lsb_release -a
pooja@X1-Carbon-6:/etc/apt/sources.list.d$

pooja@X1-Carbon-6:/etc/apt/sources.list.d$ head -n 3 /usr/bin/lsb_release
!/usr/bin/python3.5 -Es

# lsb_release command for Debian
pooja@X1-Carbon-6:/etc/apt/sources.list.d$

Meanwhile, I realized this morning that I got xterm as well, quite a relief.

Best Regards,
pooja

Revision history for this message
Manfred Hampl (m-hampl) said :
#21

1. Sorry for errors in one of my commands.
Try again with:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv BA6932366A755776 04EE7237B7D453EC 51716619E084DAB9

2. It seems that you have made a wrong modification in the lsb_release script:
the first line has to start with "#!/" but the hash sign is missing!

Try

sudo apt install --reinstall lsb-release
lsb_release -crid

and report the output.

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#22

Here are the outputs please:

1.
pooja@X1-Carbon-6:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv BA6932366A755776 04EE7237B7D453EC 51716619E084DAB9
Executing: /tmp/tmp.oISwltjC0F/gpg.1.sh --keyserver
keyserver.ubuntu.com
--recv
BA6932366A755776
04EE7237B7D453EC
51716619E084DAB9

gpg: key 51716619E084DAB9: "Michael Rutter <email address hidden>" 2 new signatures
gpg: key E0B11894F66AEC98: public key "Debian Archive Automatic Signing Key (9/stretch) <email address hidden>" imported
gpg: key BA6932366A755776: public key "Launchpad PPA for deadsnakes" imported
gpg: Total number processed: 3
gpg: imported: 2
gpg: new signatures: 2
pooja@X1-Carbon-6:~$

2.
pooja@X1-Carbon-6:~$ sudo apt install --reinstall lsb-release
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 11,8 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 lsb-release all 9.20160110ubuntu0.2 [11,8 kB]
Fetched 11,8 kB in 16s (733 B/s)
(Reading database ... 555914 files and directories currently installed.)
Preparing to unpack .../lsb-release_9.20160110ubuntu0.2_all.deb ...
Unpacking lsb-release (9.20160110ubuntu0.2) over (9.20160110ubuntu0.2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up lsb-release (9.20160110ubuntu0.2) ...

pooja@X1-Carbon-6:~$ lsb_release -crid
Traceback (most recent call last):
  File "/usr/bin/lsb_release", line 25, in <module>
    import lsb_release
ImportError: No module named 'lsb_release'
pooja@X1-Carbon-6:~$

3. I checked manually /usr/bin/lsb_release, it's:
#!/usr/bin/python3 -Es

# lsb_release command for Debian
# (C) 2005-10 Chris Lawrence <email address hidden>

Thanks,
pooja

Revision history for this message
Manfred Hampl (m-hampl) said :
#23

Ok, at least the basic functions of the system are back.

Now let's try getting python set up correctly again.

What is the output of

ls -l /usr/bin/python*
echo $PYTHONPATH
python2 -c "import lsb_release"
python3 -c "import lsb_release"
python3.5 -c "import lsb_release"
sudo update-alternatives --list python
sudo update-alternatives --list python2
sudo update-alternatives --list python3

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#24

I'm definitely much more relieved, yesterday I was in panic mode, thanks a lot.

pooja@X1-Carbon-6:~$ ls -l /usr/bin/python*
lrwxrwxrwx 1 root root 24 Mär 3 16:41 /usr/bin/python -> /etc/alternatives/python
lrwxrwxrwx 1 root root 9 Nov 24 2017 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root 3492624 Mär 1 21:47 /usr/bin/python2.7
lrwxrwxrwx 1 root root 33 Mär 1 21:47 /usr/bin/python2.7-config -> x86_64-linux-gnu-python2.7-config
lrwxrwxrwx 1 root root 16 Nov 24 2017 /usr/bin/python2-config -> python2.7-config
-rwxr-xr-x 1 root root 306 Okt 24 2015 /usr/bin/python2-futurize
-rwxr-xr-x 1 root root 319 Feb 24 2016 /usr/bin/python2-jsonschema
-rwxr-xr-x 1 root root 310 Okt 24 2015 /usr/bin/python2-pasteurize
-rwxr-xr-x 1 root root 151 Nov 23 2015 /usr/bin/python2-pbr
lrwxrwxrwx 1 root root 24 Mär 3 17:55 /usr/bin/python3 -> /usr/local/bin/python3.5
-rwxr-xr-x 1 root root 0 Mär 3 17:02 /usr/bin/python3.5
lrwxrwxrwx 1 root root 24 Mär 2 14:04 /usr/bin/python3.8 -> /usr/local/bin/python3.8
lrwxrwxrwx 1 root root 16 Mär 23 2016 /usr/bin/python3-config -> python3.5-config
lrwxrwxrwx 1 root root 10 Mär 23 2016 /usr/bin/python3m -> python3.5m
lrwxrwxrwx 1 root root 17 Mär 23 2016 /usr/bin/python3m-config -> python3.5m-config
lrwxrwxrwx 1 root root 16 Nov 24 2017 /usr/bin/python-config -> python2.7-config
lrwxrwxrwx 1 root root 58 Mär 25 2016 /usr/bin/pythontex -> ../share/texlive/texmf-dist/scripts/pythontex/pythontex.py
-rwxr-xr-x 1 root root 306 Mär 25 2016 /usr/bin/pythontex3
pooja@X1-Carbon-6:~$

pooja@X1-Carbon-6:~$ echo $PYTHONPATH

pooja@X1-Carbon-6:~$ python2 -c "import lsb_release"
pooja@X1-Carbon-6:~$ python3 -c "import lsb_release"
pooja@X1-Carbon-6:~$ python3.5 -c "import lsb_release"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named 'lsb_release'
pooja@X1-Carbon-6:~$ sudo update-alternatives --list python
/usr/bin/python2.7
/usr/bin/python3.8
pooja@X1-Carbon-6:~$ sudo update-alternatives --list python2
update-alternatives: error: no alternatives for python2
pooja@X1-Carbon-6:~$ sudo update-alternatives --list python3
/usr/bin/python3.8
pooja@X1-Carbon-6:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#25

Ok. One cause of the problem most probably is the number of different Python versions on your system.

I see traces of
Ubuntu's Python 2.7
Ubuntu's Python 3.5
a foreign Python 3.5
a foreign Python 3.8

Before going into further details with this, let me go back to checking the package management system, to verify whether the changes done earlier have fully worked.

What is the output of the commands

sudo apt update
sudo apt full-upgrade
dpkg -l | grep ' python'

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#26

Hi Manfred, here are thr outputs (the last one seem to be really looong).
Yeah, for my work I installed python3.6 earlier last year and 3.8 is my current requirement. I would be ok in getting rid of 3.6, if that clean up some mess.

pooja@X1-Carbon-6:~$ sudo apt update
[sudo] password for pooja:
Hit:1 https://linux.teamviewer.com/deb stable InRelease
Hit:2 https://download.docker.com/linux/ubuntu xenial InRelease
Hit:3 https://repo.skype.com/deb stable InRelease
Hit:4 https://packages.microsoft.com/repos/ms-teams stable InRelease
Hit:5 https://artifacts.elastic.co/packages/7.x/apt stable InRelease
Hit:6 https://vagrant-deb.linestarve.com any InRelease
Get:7 https://ftp.ussg.iu.edu/CRAN/bin/linux/ubuntu xenial/ InRelease [3.607 B]
Hit:8 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:9 http://download.virtualbox.org/virtualbox/debian xenial InRelease
Get:10 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Hit:11 http://ppa.launchpad.net/alexlarsson/flatpak/ubuntu xenial InRelease
Hit:12 http://packages.microsoft.com/repos/code stable InRelease
Hit:13 http://de.archive.ubuntu.com/ubuntu xenial InRelease
Get:14 http://httpredir.debian.org/debian unstable InRelease [154 kB]
Get:15 http://de.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Hit:16 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu xenial InRelease
Get:17 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial InRelease [18,1 kB]
Hit:18 http://archive.canonical.com/ubuntu xenial InRelease
Hit:19 http://ppa.launchpad.net/linuxuprising/java/ubuntu xenial InRelease
Hit:20 http://ppa.launchpad.net/umang/indicator-stickynotes/ubuntu xenial InRelease
Hit:21 http://ppa.launchpad.net/vikoadi/ppa/ubuntu xenial InRelease
Hit:22 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Get:23 http://httpredir.debian.org/debian unstable/main Sources.diff/Index [63,6 kB]
Get:24 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [93,6 kB]
Ign:25 https://deb.etcher.io stable InRelease
Get:26 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [130 kB]
Get:27 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [326 kB]
Get:28 https://deb.etcher.io stable Release [3.674 B]
Get:29 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 DEP-11 Metadata [2.468 B]
Get:30 http://httpredir.debian.org/debian unstable/main Sources T-2021-03-04-0800.43-F-2021-03-04-0800.43.pdiff [8.970 B]
Get:31 https://deb.etcher.io stable Release.gpg [821 B]
Get:30 http://httpredir.debian.org/debian unstable/main Sources T-2021-03-04-0800.43-F-2021-03-04-0800.43.pdiff [8.970 B]
Get:32 http://de.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [1.216 kB]
Get:33 http://de.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [1.083 kB]
Get:34 http://de.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [281 kB]
Get:35 http://de.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [5.988 B]
Hit:36 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Get:37 https://packages.cloudfoundry.org/debian stable InRelease [2.679 B]
Get:38 https://packages.cloudfoundry.org/debian stable/main amd64 Packages [11,2 kB]
Get:39 https://packages.cloudfoundry.org/debian stable/main i386 Packages [11,2 kB]
Fetched 3.635 kB in 20s (181 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
pooja@X1-Carbon-6:~$

pooja@X1-Carbon-6:~$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pooja@X1-Carbon-6:~$

pooja@X1-Carbon-6:~$ dpkg -l | grep ' python'
ii libpython-stdlib:amd64 2.7.12-1~16.04 amd64 interactive high-level object-oriented language (default python version)
ii libpython3-stdlib:amd64 3.5.1-3 amd64 interactive high-level object-oriented language (default python3 version)
ii python 2.7.12-1~16.04 amd64 interactive high-level object-oriented language (default version)
ii python-all 2.7.12-1~16.04 amd64 package depending on all supported Python runtime versions
ii python-all-dev 2.7.12-1~16.04 amd64 package depending on all supported Python development packages
ii python-apport 2.20.1-0ubuntu2.30 all Python library for Apport crash report handling
ii python-apt 1.1.0~beta1ubuntu0.16.04.11 amd64 Python interface to libapt-pkg
ii python-apt-common 1.1.0~beta1ubuntu0.16.04.11 all Python interface to libapt-pkg (locales)
ii python-attr 15.2.0-1 all Attributes without boilerplate (Python 2)
ii python-backports.ssl-match-hostname 3.4.0.2-1 all Backport of the Python 3.2 SSL hostname checking function
ii python-bs4 4.4.1-1 all error-tolerant HTML parser for Python
ii python-cached-property 1.3.0-1 all Provides cached-property for decorating methods in classes (Python 2)
ii python-cairo 1.8.8-2 amd64 Python bindings for the Cairo vector graphics library
ii python-cffi-backend 1.5.2-1ubuntu1 amd64 Foreign Function Interface for Python calling C code - backend
ii python-chardet 2.3.0-2 all universal character encoding detector for Python2
ii python-crypto 2.6.1-6ubuntu0.16.04.3 amd64 cryptographic algorithms and protocols for Python
ii python-cryptography 1.2.3-1ubuntu0.3 amd64 Python library exposing cryptographic recipes and primitives (Python 2)
ii python-cycler 0.9.0-1 all composable kwarg iterator (Python 2)
ii python-dateutil 2.4.2-1 all powerful extensions to the standard datetime module
ii python-dbus 1.2.0-3 amd64 simple interprocess messaging system (Python interface)
ii python-debian 0.1.27ubuntu2 all Python modules to work with Debian-related data formats
ii python-debianbts 2.6.0 all Python interface to Debian's Bug Tracking System
ii python-dev 2.7.12-1~16.04 amd64 header files and a static library for Python (default)
ii python-docker 1.9.0-1~16.04.1 all Python wrapper to access docker.io's control socket
ii python-dockerpty 0.4.1-1~16.04.1 all Pseudo-tty handler for docker Python client (Python 2.x)
ii python-docopt 0.6.2-1build1 all command-line interface description language
ii python-enum34 1.1.2-1 all backport of Python 3.4's enum package
ii python-funcsigs 0.4-2 all function signatures from PEP362 - Python 2.7
ii python-functools32 3.2.3.2-2 all Backport of the functools module from Python 3.2.3 to Python 2.7
ii python-future 0.15.2-1 all single-source support for Python 3 and 2 - Python 2.x
ii python-gi 3.20.0-0ubuntu1 amd64 Python 2.x bindings for gobject-introspection libraries
ii python-glade2 2.24.0-4ubuntu1 amd64 GTK+ bindings: Glade support
ii python-gobject-2 2.28.6-12ubuntu1 amd64 deprecated static Python bindings for the GObject library
ii python-gtk2 2.24.0-4ubuntu1 amd64 Python bindings for the GTK+ widget set
ii python-html5lib 0.999-4 all HTML parser/tokenizer based on the WHATWG HTML5 specification (Python 2)
ii python-httplib2 0.9.1+dfsg-1 all comprehensive HTTP client library written for Python
ii python-idna 2.0-3 all Python IDNA2008 (RFC 5891) handling (Python 2)
ii python-imaging 3.1.2-0ubuntu1.5 all Python Imaging Library compatibility layer
ii python-ipaddress 1.0.16-1 all Backport of Python 3 ipaddress module (Python 2)
ii python-jsonschema 2.5.1-4 all An(other) implementation of JSON Schema (Draft 3) - Python 2.7
ii python-keyring 7.3-1ubuntu1 all store and access your passwords safely
ii python-launchpadlib 1.10.3-3ubuntu0.1 all Launchpad web services client library
ii python-lazr.restfulclient 0.13.4-5ubuntu2 all client for lazr.restful-based web services
ii python-lazr.uri 1.0.3-2build1 all library for parsing, manipulating, and generating URIs
ii python-lockfile 1:0.12.2-1 all file locking library for Python — Python 2 library
ii python-lxml 3.5.0-1ubuntu0.3 amd64 pythonic binding for the libxml2 and libxslt libraries
ii python-matplotlib 1.5.1-1ubuntu1 amd64 Python based plotting system in a style similar to Matlab
ii python-matplotlib-data 1.5.1-1ubuntu1 all Python based plotting system (data package)
ii python-minimal 2.7.12-1~16.04 amd64 minimal subset of the Python language (default version)
ii python-mock 1.3.0-2.1ubuntu1 all Mocking and Testing Library
ii python-ndg-httpsclient 0.4.0-3 all enhanced HTTPS support for httplib and urllib2 using PyOpenSSL for Python2
ii python-numpy 1:1.11.0-1ubuntu1 amd64 Numerical Python adds a fast array facility to the Python language
ii python-oauth 1.0.1-5 all Python library implementing of the OAuth protocol
ii python-openssl 0.15.1-2ubuntu0.2 all Python 2 wrapper around the OpenSSL library
ii python-pam 0.4.2-13.2ubuntu2 amd64 Python interface to the PAM library
ii python-pbr 1.8.0-4ubuntu1 all inject useful and sensible default behaviors into setuptools - Python 2.x
ii python-pil:amd64 3.1.2-0ubuntu1.5 amd64 Python Imaging Library (Pillow fork)
ii python-pil.imagetk:amd64 3.1.2-0ubuntu1.5 amd64 Python Imaging Library - ImageTk Module (Pillow fork)
ii python-pip 8.1.1-2ubuntu0.6 all alternative Python package installer
ii python-pip-whl 8.1.1-2ubuntu0.6 all alternative Python package installer
ii python-pkg-resources 20.7.0-1 all Package Discovery and Resource Access using pkg_resources
ii python-problem-report 2.20.1-0ubuntu2.30 all Python library to handle problem reports
ii python-pyasn1 0.1.9-1 all ASN.1 library for Python (Python 2 module)
ii python-pyasn1-modules 0.0.7-0.1 all Collection of protocols modules written in ASN.1 language
ii python-pycurl 7.43.0-1ubuntu1 amd64 Python bindings to libcurl
ii python-pyparsing 2.0.3+dfsg1-1ubuntu0.2 all Python parsing module
ii python-pysimplesoap 1.16-1 all simple and lightweight SOAP Library (Python 2)
ii python-reportbug 6.6.6ubuntu1 all Python modules for interacting with bug tracking systems
ii python-requests 2.9.1-3ubuntu0.1 all elegant and simple HTTP library for Python2, built for human beings
ii python-secretstorage 2.1.3-1 all Python module for storing secrets - Python 2.x version
ii python-serial 3.0.1-1 all pyserial - module encapsulating access for the serial port
ii python-service-identity 16.0.0-2 all Service identity verification for pyOpenSSL (Python 2 module)
ii python-setuptools 20.7.0-1 all Python Distutils Enhancements
ii python-simplejson 3.8.1-1ubuntu2 amd64 simple, fast, extensible JSON encoder/decoder for Python
ii python-six 1.10.0-3 all Python 2 and 3 compatibility library (Python 2 interface)
ii python-squaremap 1:1.0.4-2 all wxPython control to display hierarchic data as nested squares
ii python-talloc 2.1.5-2 amd64 hierarchical pool based memory allocator - Python bindings
ii python-texttable 0.8.1-1 all Module for creating simple ASCII tables
ii python-tk 2.7.12-1~16.04 amd64 Tkinter - Writing Tk applications with Python
ii python-twisted-bin 16.0.0-1ubuntu0.4 amd64 Event-based framework for internet applications
ii python-twisted-core 16.0.0-1ubuntu0.4 all Event-based framework for internet applications
ii python-tz 2014.10~dfsg1-0ubuntu2 all Python version of the Olson timezone database
ii python-urllib3 1.13.1-2ubuntu0.16.04.4 all HTTP library with thread-safe connection pooling for Python
ii python-virtualenv 15.0.1+ds-3ubuntu1.1 all Python virtual environment creator
ii python-wadllib 1.3.2-3ubuntu0.16.04.1 all Python library for navigating WADL files
ii python-websocket 0.18.0-2 all WebSocket client library for Python
ii python-wheel 0.29.0-1 all built-package format for Python
ii python-wxgtk3.0 3.0.2.0+dfsg-1build1 amd64 Python interface to the wxWidgets Cross-platform C++ GUI toolkit
ii python-wxversion 3.0.2.0+dfsg-1build1 all API for selecting the wxPython version to use
ii python-xdg 0.25-4ubuntu0.16.04.1 all Python 2 library to access freedesktop.org standards
ii python-yaml 3.11-3build1 amd64 YAML parser and emitter for Python
ii python-zope.interface 4.1.3-1build1 amd64 Interfaces for Python
ii python2.7 2.7.12-1ubuntu0~16.04.18 amd64 Interactive high-level object-oriented language (version 2.7)
ii python2.7-dev 2.7.12-1ubuntu0~16.04.18 amd64 Header files and a static library for Python (v2.7)
ii python2.7-minimal 2.7.12-1ubuntu0~16.04.18 amd64 Minimal subset of the Python language (version 2.7)
ii python3 3.5.1-3 amd64 interactive high-level object-oriented language (default python3 version)
ii python3-apparmor 2.10.95-0ubuntu2.11 amd64 AppArmor Python3 utility library
ii python3-apparmor-click 0.3.13.1 all Click manifest to AppArmor easyprof conversion tools
ii python3-apport 2.20.1-0ubuntu2.30 all Python 3 library for Apport crash report handling
ii python3-apt 1.1.0~beta1ubuntu0.16.04.11 amd64 Python 3 interface to libapt-pkg
ii python3-blinker 1.3.dfsg2-1build1 all fast, simple object-to-object and broadcast signaling library
ii python3-brlapi 5.3.1-2ubuntu2.1 amd64 Braille display access via BRLTTY - Python3 bindings
ii python3-bs4 4.4.1-1 all error-tolerant HTML parser for Python 3
ii python3-cairo 1.10.0+dfsg-5build1 amd64 Python 3 bindings for the Cairo vector graphics library
ii python3-cffi-backend 1.5.2-1ubuntu1 amd64 Foreign Function Interface for Python 3 calling C code - runtime
ii python3-chardet 2.3.0-2 all universal character encoding detector for Python3
ii python3-checkbox-support 0.22-1 all collection of Python modules used by PlainBox providers
ii python3-click-package 0.4.43+16.04.20170613-0ubuntu1 amd64 Click packages (Python 3 interface)
ii python3-commandnotfound 0.3ubuntu16.04.2 all Python 3 bindings for command-not-found.
ii python3-cryptography 1.2.3-1ubuntu0.3 amd64 Python library exposing cryptographic recipes and primitives (Python 3)
ii python3-cups 1.9.73-0ubuntu2 amd64 Python3 bindings for CUPS
ii python3-cupshelpers 1.5.7+20160212-0ubuntu2 all Python modules for printer configuration with CUPS
ii python3-cycler 0.9.0-1 all composable kwarg iterator (Python 3)
ii python3-dateutil 2.4.2-1 all powerful extensions to the standard datetime module
ii python3-dbus 1.2.0-3 amd64 simple interprocess messaging system (Python 3 interface)
ii python3-debian 0.1.27ubuntu2 all Python 3 modules to work with Debian-related data formats
ii python3-decorator 4.0.6-1 all simplify usage of Python decorators by programmers
ii python3-defer 1.0.6-2build1 all Small framework for asynchronous programming (Python 3)
ii python3-dev 3.5.1-3 amd64 header files and a static library for Python (default)
ii python3-distupgrade 1:16.04.32 all manage release upgrades
ii python3-feedparser 5.1.3-3build1 all Universal Feed Parser for Python 3
ii python3-flask 0.10.1-2ubuntu0.1 all micro web framework based on Werkzeug, Jinja2 and good intentions
ii python3-gdbm:amd64 3.5.1-1 amd64 GNU dbm database support for Python 3.x
ii python3-gi 3.20.0-0ubuntu1 amd64 Python 3 bindings for gobject-introspection libraries
ii python3-gi-cairo 3.20.0-0ubuntu1 amd64 Python 3 Cairo bindings for the GObject library
ii python3-guacamole 0.9.2-1 all framework for creating command line applications (Python 3)
ii python3-html5lib 0.999-4 all HTML parser/tokenizer based on the WHATWG HTML5 specification (Python 3)
ii python3-httplib2 0.9.1+dfsg-1 all comprehensive HTTP client library written for Python3
ii python3-idna 2.0-3 all Python IDNA2008 (RFC 5891) handling (Python 3)
ii python3-itsdangerous 0.24+dfsg1-1 all Various helpers to pass trusted data to untrusted environment - python 3.x
ii python3-jinja2 2.8-1ubuntu0.1 all small but fast and easy to use stand-alone template engine
ii python3-joblib 0.9.4-1 all tools to provide lightweight pipelining in Python
ii python3-jwt 1.3.0-1ubuntu0.1 all Python 3 implementation of JSON Web Token
ii python3-libapparmor 2.10.95-0ubuntu2.11 amd64 AppArmor library Python3 bindings
ii python3-louis 2.6.4-2ubuntu0.4 all Python bindings for liblouis
ii python3-lxml 3.5.0-1ubuntu0.3 amd64 pythonic binding for the libxml2 and libxslt libraries
ii python3-magic 1:5.25-2ubuntu1.4 all File type determination library using "magic" numbers (Python 3 bindings)
ii python3-mako 1.0.3+ds1-1ubuntu1 all fast and lightweight templating for the Python 3 platform
ii python3-markupsafe 0.23-2build2 amd64 HTML/XHTML/XML string library for Python 3
ii python3-matplotlib 1.5.1-1ubuntu1 amd64 Python based plotting system in a style similar to Matlab (Python 3)
ii python3-minimal 3.5.1-3 amd64 minimal subset of the Python language (default python3 version)
ii python3-nose 1.3.7-1 all test discovery and running for Python3 unittest
ii python3-numpy 1:1.11.0-1ubuntu1 amd64 Fast array facility to the Python 3 language
ii python3-oauthlib 1.0.3-1 all generic, spec-compliant implementation of OAuth for Python3
ii python3-openssl 0.15.1-2ubuntu0.2 all Python 3 wrapper around the OpenSSL library
ii python3-padme 1.1.1-2 all mostly transparent proxy class for Python 3
ii python3-pexpect 4.0.1-1 all Python 3 module for automating interactive applications
ii python3-pil:amd64 3.1.2-0ubuntu1.5 amd64 Python Imaging Library (Python3)
ii python3-pip 8.1.1-2ubuntu0.6 all alternative Python package installer - Python 3 version of the package
ii python3-pluggy 0.3.1-1 all plugin and hook calling mechanisms for Python
ii python3-problem-report 2.20.1-0ubuntu2.30 all Python 3 library to handle problem reports
ii python3-ptyprocess 0.5-1 all Run a subprocess in a pseudo terminal from Python 3
ii python3-py 1.4.31-1 all Advanced Python development support library (Python 3)
ii python3-pyasn1 0.1.9-1 all ASN.1 library for Python (Python 3 module)
ii python3-pyatspi 2.18.0+dfsg-3 all Assistive Technology Service Provider Interface - Python3 bindings
ii python3-pycurl 7.43.0-1ubuntu1 amd64 Python bindings to libcurl (Python 3)
ii python3-pyinotify 0.9.6-0fakesync1 all simple Linux inotify Python bindings
ii python3-pyparsing 2.0.3+dfsg1-1ubuntu0.2 all Python parsing module, Python3 package
ii python3-renderpm:amd64 3.3.0-1ubuntu0.1 amd64 python low level render interface
ii python3-reportlab 3.3.0-1ubuntu0.1 all ReportLab library to create PDF documents using Python3
ii python3-reportlab-accel:amd64 3.3.0-1ubuntu0.1 amd64 C coded extension accelerator for the ReportLab Toolkit
ii python3-requests 2.9.1-3ubuntu0.1 all elegant and simple HTTP library for Python3, built for human beings
ii python3-scipy 0.17.0-1 amd64 scientific tools for Python 3
ii python3-selinux 2.4-3build2 amd64 Python3 bindings to SELinux shared libraries
ii python3-setuptools 20.7.0-1 all Python3 Distutils Enhancements
ii python3-simplegeneric 0.8.1-1 all simple generic functions for Python3
ii python3-simplejson 3.8.1-1ubuntu2 amd64 JSON encoder and decoder for Python 3
ii python3-six 1.10.0-3 all Python 2 and 3 compatibility library (Python 3 interface)
ii python3-sklearn 0.17.0-4 all Python modules for machine learning and data mining
ii python3-sklearn-lib 0.17.0-4 amd64 low-level implementations and bindings for scikit-learn - Python 3
ii python3-slip 0.6.1-3 all miscellaneous convenience, extension and workaround code for Python
ii python3-slip-dbus 0.6.1-3 all convenience functions for D-Bus services
ii python3-systemd 231-2build1 amd64 Python 3 bindings for systemd
ii python3-tk 3.5.1-1 amd64 Tkinter - Writing Tk applications with Python 3.x
ii python3-tz 2014.10~dfsg1-0ubuntu2 all Python3 version of the Olson timezone database
ii python3-uno 1:5.1.6~rc2-0ubuntu1~xenial10 amd64 Python-UNO bridge
ii python3-update-manager 1:16.04.17 all python 3.x module for update-manager
ii python3-urllib3 1.13.1-2ubuntu0.16.04.4 all HTTP library with thread-safe connection pooling for Python3
ii python3-venv 3.5.1-3 amd64 pyvenv-3 binary for python3 (default python3 version)
ii python3-virtualenv 15.0.1+ds-3ubuntu1.1 all Python virtual environment creator
ii python3-werkzeug 0.10.4+dfsg1-1ubuntu1.2 all collection of utilities for WSGI applications
ii python3-wheel 0.29.0-1 all built-package format for Python
ii python3-xdg 0.25-4ubuntu0.16.04.1 all Python 3 library to access freedesktop.org standards
ii python3-xkit 0.5.0ubuntu2 all library for the manipulation of xorg.conf files (Python 3)
ii python3-xlsxwriter 0.7.3-1 all Python 3 module for creating Excel XLSX files
ii python3.5 3.5.2-2ubuntu0~16.04.13 amd64 Interactive high-level object-oriented language (version 3.5)
ii python3.5-dev 3.5.2-2ubuntu0~16.04.13 amd64 Header files and a static library for Python (v3.5)
ii python3.5-minimal 3.5.2-2ubuntu0~16.04.13 amd64 Minimal subset of the Python language (version 3.5)
ii python3.5-venv 3.5.2-2ubuntu0~16.04.13 amd64 Interactive high-level object-oriented language (pyvenv binary, version 3.5)
pooja@X1-Carbon-6:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#27

No errors for "apt update" any more.

"1 package can be upgraded. Run 'apt list --upgradable' to see it."

What is the output of

apt list --upgradable

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#28

Its only skype, I hardly use it on my laptop, so not at all necessary. :)

pooja@X1-Carbon-6:~$ apt list --upgradable
Listing... Done
skypeforlinux/stable 8.69.0.77 amd64 [upgradable from: 8.64.0.81]
N: There are 5 additional versions. Please use the '-a' switch to see them.
pooja@X1-Carbon-6:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#29

"Yeah, for my work I installed python3.6 earlier last year and 3.8 is my current requirement. I would be ok in getting rid of 3.6, if that clean up some mess."

I do not see a 3.6 version, but two 3.5 versions and a 3.8 version

How did you install the additional python versions?

My suggestions would be to get rid of all foreign python installations (in /usr/local/).

If you need python3.8, then you probably better install that version from a PPA.
ppa:deadsnakes/ppa which you already have enabled provides such version, named python3.8

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#30

I do not see a 3.6 version, but two 3.5 versions and a 3.8 version

-> Ohh, yeah..as I could not manage to install python3_minimal, so tried in parallel to install it via binary. with python3.5, I am flexible.
-> Ohh, yeah..true. then probably I already got rid of 3.6

My suggestions would be to get rid of all foreign python installations (in /usr/local/).

If you need python3.8, then you probably better install that version from a PPA.
ppa:deadsnakes/ppa which you already have enabled provides such version, named python3.8

-> I'm afraid, I do not really want to touch my python3.8. I managed to setup the whole pycharm/tensorflow setup, and it will all break, if I do any re-installation. I need this for two months, then I would be willing to even remove complete /usr/local/, besides in 4 months, I will be receiving MAC machine from office. So I need this working laptop/Ubuntu for only 4 months (finger crossed!)
-> Also, I tried installing python3.8 first via this ppa:deadsnakes/ppa, as binary always take forever to install. Since it did not work, installed it via binary.

Thanks a lot for bearing with me...
pooja

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#31

I would love to have my terminal back, if that's possible, since all basic python setup is back now, thanks to you.
Xterm is doable, but not like real terminal.

Revision history for this message
Manfred Hampl (m-hampl) said :
#32

What happens if you now try starting a terminal?
Is there anything else that does not work as desired?

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#33

I tried launching it, does not work. Also via CTRL+ATL+T (if i remember right the shortkey) https://hackmd.io/Sw2MlJc5RCK78XC_2jDW3Q
Also, not able to open 'system settings'. Rest I do not really miss anything..

Revision history for this message
Manfred Hampl (m-hampl) said :
#34

What happens if you start the command
gnome-terminal
from inside a xterm window

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#35

pooja@X1-Carbon-6:~$
pooja@X1-Carbon-6:~$ gnome-terminal
Traceback (most recent call last):
  File "/usr/bin/gnome-terminal", line 9, in <module>
    from gi.repository import GLib, Gio
ModuleNotFoundError: No module named 'gi'
pooja@X1-Carbon-6:~$

sadly,

Revision history for this message
Manfred Hampl (m-hampl) said :
#36

This is caused by your misconfigured python installation.

For me this infomation is contradictory:

lrwxrwxrwx 1 root root 24 Mär 3 17:55 /usr/bin/python3 -> /usr/local/bin/python3.5

pooja@X1-Carbon-6:~$ sudo update-alternatives --list python3
/usr/bin/python3.8

The first output tells that python3 points to python3.5
The second output tells that python3 points to python3.8

The python3 installation in force on your system does not find the Ubuntu packages. The files from the python-gi package (required e.g. for gnome-terminal) are not found, although the output in comment #26 shows that the related package is installed. That is all I can say.

What is the output of
locate Gio.py

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#37

pooja@X1-Carbon-6:~$
pooja@X1-Carbon-6:~$ locate Gio.py
/usr/lib/python2.7/dist-packages/gi/overrides/Gio.py
/usr/lib/python2.7/dist-packages/gi/overrides/Gio.pyc
/usr/lib/python3/dist-packages/gi/overrides/Gio.py
pooja@X1-Carbon-6:~$

pooja@X1-Carbon-6:~$ sudo update-alternatives --list python3
/usr/bin/python3.8
> I guess, I screwed it up via playing around with alternatives. My goal was to make 3.8 the default version of my Uubnut w/o realizing that there are dependencies requiring 2.7 and lower python 3 version.

lrwxrwxrwx 1 root root 24 Mär 3 17:55 /usr/bin/python3 -> /usr/local/bin/python3.5
> this was my trial before you took over to install 2.7 and 3.5 in order for system to recover.

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#38

ummm, is this really not recoverable?

pooja@X1-Carbon-6:~$ lsb_release -a
Traceback (most recent call last):
  File "/usr/bin/lsb_release", line 25, in <module>
    import lsb_release
ImportError: No module named 'lsb_release'
pooja@X1-Carbon-6:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#39

The problem that "python3" currently points into the wrong direction, I guess the python3.5 version that you installed manually in /usr/local/bin/python3.5

Try
sudo apt install --reinstall python3.5-minimal python3.5

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#40

Great, thanks a lot. I owe you a big time.
I think, I would not bother you much, I should be able to fix my terminal issue, anyways I got working xterm.

pooja@X1-Carbon-6:~$ sudo apt install --reinstall python3.5-minimal python3.5
[sudo] password for pooja:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 1 not upgraded.
Need to get 1.762 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3.5-minimal amd64 3.5.2-2ubuntu0~16.04.13 [1.597 kB]
Get:2 http://de.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python3.5 amd64 3.5.2-2ubuntu0~16.04.13 [165 kB]
Fetched 1.762 kB in 16s (107 kB/s)
(Reading database ... 555914 files and directories currently installed.)
Preparing to unpack .../python3.5-minimal_3.5.2-2ubuntu0~16.04.13_amd64.deb ...
Unpacking python3.5-minimal (3.5.2-2ubuntu0~16.04.13) over (3.5.2-2ubuntu0~16.04.13) ...
Preparing to unpack .../python3.5_3.5.2-2ubuntu0~16.04.13_amd64.deb ...
Unpacking python3.5 (3.5.2-2ubuntu0~16.04.13) over (3.5.2-2ubuntu0~16.04.13) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up python3.5-minimal (3.5.2-2ubuntu0~16.04.13) ...
Setting up python3.5 (3.5.2-2ubuntu0~16.04.13) ...
pooja@X1-Carbon-6:~$ python3
Python 3.5.2 (default, Jan 26 2021, 13:30:48)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
pooja@X1-Carbon-6:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.7 LTS
Release: 16.04
Codename: xenial
pooja@X1-Carbon-6:~$ xterm

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#41

The rest was super easy :)
I found out that gnome-terminal had python3.8 set (no clue how), I changed it to python3, and it worked like charm.

Thank YOU..

Revision history for this message
Manfred Hampl (m-hampl) said :
#42

If everything works as desired, you now should have the choice between running the commands
python (which can be changed with sudo update-alternatives between 2.7 and 3.5)
python2
python3 (probably the same as python3.5)
python3.8

Maybe even tensorflow is still working with python 3.8, but you better do not try changing the default python or python3 command to python3.8, but better just use the python3.8 command for starting.

Revision history for this message
Pooja Saxena (nrjrasaxena) said :
#43

yeah, as you wrote..it all works now :)

and yup, tensorflow also working fine with python3.8. yes, I learnt the lesson that I need python2.7 and python3, and should not be changed to python3.8.

I definitely learnt a lot about Ubuntu setup while working on this problem caused by me. Many thanks again..

(system-settings does not pop up, but I hardly use it so not really bothering, will try to look when I got some time!!)