Terminal not working and not able to fix it either
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:
This question was originally filed as bug #1917622.
Related FAQ:
None Link to a FAQ
Revision history for this message
|
#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
|
#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
|
#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:/
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
|
#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/
(expecting ")")
---
Revision history for this message
|
#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:/
Revision history for this message
|
#7 |
Hi Manfred,
thanks for your quick reply.
I was trying to work on your 2 idea, the status could be seen here https:/
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
|
#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/
What is the output of
which py3compile
sudo updatedb
locate py3compile
Revision history for this message
|
#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/
/snap/core/
/snap/core/
/snap/core/
/snap/core18/
/usr/bin/py3compile
/usr/share/
/usr/share/
In addition, I posted the error that I received when I start tty3 on my laptop here https:/
Best Regards
Revision history for this message
|
#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/
Do you need snaps on that system?
Revision history for this message
|
#11 |
here are the outputs:
$ file /usr/bin/py3compile
/usr/bin/
$ 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/
Surprisingly, no matter which python version I write in /usr/bin/
Best Regards,
Revision history for this message
|
#12 |
sorry, the last answer:
No, I do not need snaps..I do not even know, what its for..
Revision history for this message
|
#13 |
Now try again
sudo dpkg --configure -a
What output do you receive now?
Revision history for this message
|
#14 |
Please find the answer here:
https:/
Revision history for this message
|
#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:/
https:/
https:/
and re-install them with
sudo dpkg -i python3-
Revision history for this message
|
#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:/
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
|
#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
|
#18 |
here are the output :
https:/
Thanks for the heads up :)
Revision history for this message
|
#19 |
apt install is working again, but there are several configuration errors in your package management:
1. Err 403 Forbidden for PPA jonathonf/
You have to remove this PPA from your list of repositories
grep jonathonf/
and either remove the lines or the whole file
2. NO_PUBKEY and KEYEXPIRED
Issue the commands
sudo apt-key adv --keyserver:
wget -q -O - https:/
3. lsb_release
What output do you receive for
python3 /usr/bin/
head -n 3 /usr/bin/
Revision history for this message
|
#20 |
Hi Manfred,
Please find here the outputs:
pooja@X1-
Executing: /tmp/tmp.
BA6932366A755776
04EE7237B7D453EC
51716619E084DAB9
gpg: invalid option "--keyserver:
pooja@X1-
Executing: /tmp/tmp.
keyserver.
BA6932366A755776
04EE7237B7D453EC
51716619E084DAB9
gpg: WARNING: no command supplied. Trying to guess what you mean ...
pooja@X1-
OK
pooja@X1-
pooja@X1-
pooja@X1-
!/usr/bin/python3.5 -Es
# lsb_release command for Debian
pooja@X1-
Meanwhile, I realized this morning that I got xterm as well, quite a relief.
Best Regards,
pooja
Revision history for this message
|
#21 |
1. Sorry for errors in one of my commands.
Try again with:
sudo apt-key adv --keyserver keyserver.
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
|
#22 |
Here are the outputs please:
1.
pooja@X1-
Executing: /tmp/tmp.
keyserver.
--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-
2.
pooja@X1-
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://
Fetched 11,8 kB in 16s (733 B/s)
(Reading database ... 555914 files and directories currently installed.)
Preparing to unpack .../lsb-
Unpacking lsb-release (9.20160110ubun
Processing triggers for man-db (2.7.5-1) ...
Setting up lsb-release (9.20160110ubun
pooja@X1-
Traceback (most recent call last):
File "/usr/bin/
import lsb_release
ImportError: No module named 'lsb_release'
pooja@X1-
3. I checked manually /usr/bin/
#!/usr/bin/python3 -Es
# lsb_release command for Debian
# (C) 2005-10 Chris Lawrence <email address hidden>
Thanks,
pooja
Revision history for this message
|
#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
|
#24 |
I'm definitely much more relieved, yesterday I was in panic mode, thanks a lot.
pooja@X1-
lrwxrwxrwx 1 root root 24 Mär 3 16:41 /usr/bin/python -> /etc/alternativ
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/
lrwxrwxrwx 1 root root 16 Nov 24 2017 /usr/bin/
-rwxr-xr-x 1 root root 306 Okt 24 2015 /usr/bin/
-rwxr-xr-x 1 root root 319 Feb 24 2016 /usr/bin/
-rwxr-xr-x 1 root root 310 Okt 24 2015 /usr/bin/
-rwxr-xr-x 1 root root 151 Nov 23 2015 /usr/bin/
lrwxrwxrwx 1 root root 24 Mär 3 17:55 /usr/bin/python3 -> /usr/local/
-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/
lrwxrwxrwx 1 root root 16 Mär 23 2016 /usr/bin/
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/
lrwxrwxrwx 1 root root 16 Nov 24 2017 /usr/bin/
lrwxrwxrwx 1 root root 58 Mär 25 2016 /usr/bin/pythontex -> ../share/
-rwxr-xr-x 1 root root 306 Mär 25 2016 /usr/bin/pythontex3
pooja@X1-
pooja@X1-
pooja@X1-
pooja@X1-
pooja@X1-
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'lsb_release'
pooja@X1-
/usr/bin/python2.7
/usr/bin/python3.8
pooja@X1-
update-
pooja@X1-
/usr/bin/python3.8
pooja@X1-
Revision history for this message
|
#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
|
#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-
[sudo] password for pooja:
Hit:1 https:/
Hit:2 https:/
Hit:3 https:/
Hit:4 https:/
Hit:5 https:/
Hit:6 https:/
Get:7 https:/
Hit:8 http://
Hit:9 http://
Get:10 http://
Hit:11 http://
Hit:12 http://
Hit:13 http://
Get:14 http://
Get:15 http://
Hit:16 http://
Get:17 http://
Hit:18 http://
Hit:19 http://
Hit:20 http://
Hit:21 http://
Hit:22 http://
Get:23 http://
Get:24 http://
Ign:25 https:/
Get:26 http://
Get:27 http://
Get:28 https:/
Get:29 http://
Get:30 http://
Get:31 https:/
Get:30 http://
Get:32 http://
Get:33 http://
Get:34 http://
Get:35 http://
Hit:36 https:/
Get:37 https:/
Get:38 https:/
Get:39 https:/
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-
pooja@X1-
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-
pooja@X1-
ii libpython-
ii libpython3-
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~beta1ubun
ii python-apt-common 1.1.0~beta1ubun
ii python-attr 15.2.0-1 all Attributes without boilerplate (Python 2)
ii python-
ii python-bs4 4.4.1-1 all error-tolerant HTML parser for Python
ii python-
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.
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-
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-
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-
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-
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-
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-
ii python-
ii python-pyasn1 0.1.9-1 all ASN.1 library for Python (Python 2 module)
ii python-
ii python-pycurl 7.43.0-1ubuntu1 amd64 Python bindings to libcurl
ii python-pyparsing 2.0.3+dfsg1-
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-
ii python-serial 3.0.1-1 all pyserial - module encapsulating access for the serial port
ii python-
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~
ii python-urllib3 1.13.1-
ii python-virtualenv 15.0.1+
ii python-wadllib 1.3.2-3ubuntu0.
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+
ii python-wxversion 3.0.2.0+
ii python-xdg 0.25-4ubuntu0.
ii python-yaml 3.11-3build1 amd64 YAML parser and emitter for Python
ii python-
ii python2.7 2.7.12-
ii python2.7-dev 2.7.12-
ii python2.7-minimal 2.7.12-
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-
ii python3-apport 2.20.1-0ubuntu2.30 all Python 3 library for Apport crash report handling
ii python3-apt 1.1.0~beta1ubun
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-
ii python3-chardet 2.3.0-2 all universal character encoding detector for Python3
ii python3-
ii python3-
ii python3-
ii python3-
ii python3-cups 1.9.73-0ubuntu2 amd64 Python3 bindings for CUPS
ii python3-cupshelpers 1.5.7+20160212-
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-
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-
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-
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-
ii python3-
ii python3-reportlab 3.3.0-1ubuntu0.1 all ReportLab library to create PDF documents using Python3
ii python3-
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-
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~
ii python3-uno 1:5.1.6~
ii python3-
ii python3-urllib3 1.13.1-
ii python3-venv 3.5.1-3 amd64 pyvenv-3 binary for python3 (default python3 version)
ii python3-virtualenv 15.0.1+
ii python3-werkzeug 0.10.4+
ii python3-wheel 0.29.0-1 all built-package format for Python
ii python3-xdg 0.25-4ubuntu0.
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~
ii python3.5-dev 3.5.2-2ubuntu0~
ii python3.5-minimal 3.5.2-2ubuntu0~
ii python3.5-venv 3.5.2-2ubuntu0~
pooja@X1-
Revision history for this message
|
#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
|
#28 |
Its only skype, I hardly use it on my laptop, so not at all necessary. :)
pooja@X1-
Listing... Done
skypeforlinux/
N: There are 5 additional versions. Please use the '-a' switch to see them.
pooja@X1-
Revision history for this message
|
#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
|
#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
|
#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
|
#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
|
#33 |
I tried launching it, does not work. Also via CTRL+ATL+T (if i remember right the shortkey) https:/
Also, not able to open 'system settings'. Rest I do not really miss anything..
Revision history for this message
|
#34 |
What happens if you start the command
gnome-terminal
from inside a xterm window
Revision history for this message
|
#35 |
pooja@X1-
pooja@X1-
Traceback (most recent call last):
File "/usr/bin/
from gi.repository import GLib, Gio
ModuleNotFoundE
pooja@X1-
sadly,
Revision history for this message
|
#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/
pooja@X1-
/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
|
#37 |
pooja@X1-
pooja@X1-
/usr/lib/
/usr/lib/
/usr/lib/
pooja@X1-
pooja@X1-
/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/
> 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
|
#38 |
ummm, is this really not recoverable?
pooja@X1-
Traceback (most recent call last):
File "/usr/bin/
import lsb_release
ImportError: No module named 'lsb_release'
pooja@X1-
Revision history for this message
|
#39 |
The problem that "python3" currently points into the wrong direction, I guess the python3.5 version that you installed manually in /usr/local/
Try
sudo apt install --reinstall python3.5-minimal python3.5
Revision history for this message
|
#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-
[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://
Get:2 http://
Fetched 1.762 kB in 16s (107 kB/s)
(Reading database ... 555914 files and directories currently installed.)
Preparing to unpack .../python3.
Unpacking python3.5-minimal (3.5.2-
Preparing to unpack .../python3.
Unpacking python3.5 (3.5.2-
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~
Rebuilding /usr/share/
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up python3.5-minimal (3.5.2-
Setting up python3.5 (3.5.2-
pooja@X1-
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-
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.7 LTS
Release: 16.04
Codename: xenial
pooja@X1-
Revision history for this message
|
#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
|
#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
|
#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!!)