linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.45k stars 732 forks source link

unable to launch Cinnamon system settings in LM20.3 #10591

Closed juglanshub closed 1 month ago

juglanshub commented 2 years ago
 * Cinnamon version (cinnamon --5.2.7 version)
   - Please specify if you are using the daily builds PPA - NO
     (https://launchpad.net/~linuxmint-daily-build-team/+archive/ubuntu/daily-builds).
 * Distribution - (Mint 20.3)
 * Graphics hardware *and* driver used:  Device-1: Intel 3rd Gen Core processor Graphics vendor: Lenovo driver: i915 v: kernel
           bus ID: 00:02.0 chip ID: 8086:0166
 * 64 bit
 * Attach ~/.xsession-errors, or /var/log/syslog

Issue

Background: Following my comments on 'Linux Mint 20.3 Una Cinnamon release" blog, and at the request of Clem, I am submitting this Cinnamon issue.

Problem:
on 8-Jan-22, I updated from LM20.2 to LM20.3 on my Lenovo x230 laptop, running Cinnamon & Linux kernel 5.4.0-92.
No errors encountered during the update process or after a reboot.

The issue I am experiencing is that since upgrading to LM20.3, I am unable to launch the 'System Settings' or 'System Info' or 'Startup applications' tasks in the toolbar from the bottom left corner LM menu. When I click on any of these 3 icons, nothing happens. No error messages either. Bug happens “always”

Other system functions in the toolbar such at 'System reports' & 'System monitor' & 'System Profiler' are working fine.
'System reports' states 'no problems found' & there are no crash reports. Also. the 'system info' tab displays the details I expect. All user applications launch OK.

I am partially able to launch 'system settings' from the command line with $ cinnamon-control-center
This displays a partial systems settings gui with just 4 hardware icons, which will launch the setting, but am unable to see or scroll to any other system settings icons.

Q&A Q1. What errors do you get when running it from terminal with “cinnamon-settings”? A1. Command “cinnamon-settings” produces error message “no module named certifi"

Q2. Does installing python3-certifi fix it ? A2. software manager confirms python3-certifi is already installed. Version is 2019.11.28-1

Q3. you might have a conflict between system python modules and user installed ones (via pip). my guess is that your version of python3-requests is pip’s. Can you try to apt install python3-requests ? A3. tried installing via 'apt install python3-requests' but message stated python3-requests already newest version and would not install.

Steps to reproduce Bug happens “always”

Expected behaviour Expect System settings GUI to launch when icon clicked

Other information

Configuration info, if applicable Q4. what is the output of “dpkg -l | grep python” A4. the output is :


properjob@properjob-ThinkPad-X230:~$ dpkg -l | grep python
ii  libpython2-stdlib:amd64                    2.7.17-2ubuntu4                       amd64        interactive high-level object-oriented language (Python2)
ii  libpython2.7-minimal:amd64                 2.7.18-1~20.04.1                      amd64        Minimal subset of the Python language (version 2.7)
ii  libpython2.7-stdlib:amd64                  2.7.18-1~20.04.1                      amd64        Interactive high-level object-oriented language (standard library, version 2.7)
ii  libpython3-dev:amd64                       3.8.2-0ubuntu2                        amd64        header files and a static library for Python (default)
ii  libpython3-stdlib:amd64                    3.8.2-0ubuntu2                        amd64        interactive high-level object-oriented language (default python3 version)
ii  libpython3.8:amd64                         3.8.10-0ubuntu1~20.04.2               amd64        Shared Python runtime library (version 3.8)
ii  libpython3.8-dev:amd64                     3.8.10-0ubuntu1~20.04.2               amd64        Header files and a static library for Python (v3.8)
ii  libpython3.8-minimal:amd64                 3.8.10-0ubuntu1~20.04.2               amd64        Minimal subset of the Python language (version 3.8)
ii  libpython3.8-stdlib:amd64                  3.8.10-0ubuntu1~20.04.2               amd64        Interactive high-level object-oriented language (standard library, version 3.8)
ii  python-apt-common                          2.0.0ubuntu0.20.04.6                  all          Python interface to libapt-pkg (locales)
ii  python-cairo:amd64                         1.16.2-2ubuntu2                       amd64        Python bindings for the Cairo vector graphics library
ii  python-crypto                              2.6.1-13ubuntu2                       amd64        cryptographic algorithms and protocols for Python
ii  python-gi                                  3.36.0-1                              amd64        Python 2.x bindings for gobject-introspection libraries
ii  python-gobject-2                           2.28.6-14ubuntu1                      amd64        deprecated static Python bindings for the GObject library
ii  python-nemo                                5.2.0+una                             amd64        Python binding for Nemo components
ii  python-pip-whl                             20.0.2-5ubuntu1.6                     all          Python package installer
ii  python-tinycss2-common                     1.0.2-1                               all          Low-level CSS parser (test data)
ii  python-xdg                                 0.26-1ubuntu1                         all          Python 2 library to access freedesktop.org standards
ii  python2                                    2.7.17-2ubuntu4                       amd64        interactive high-level object-oriented language (Python2 version)
ii  python2-minimal                            2.7.17-2ubuntu4                       amd64        minimal subset of the Python2 language
ii  python2.7                                  2.7.18-1~20.04.1                      amd64        Interactive high-level object-oriented language (version 2.7)
ii  python2.7-minimal                          2.7.18-1~20.04.1                      amd64        Minimal subset of the Python language (version 2.7)
ii  python3                                    3.8.2-0ubuntu2                        amd64        interactive high-level object-oriented language (default python3 version)
ii  python3-apport                             2.20.11-0ubuntu27.21                  all          Python 3 library for Apport crash report handling
ii  python3-apt                                2.0.0ubuntu0.20.04.6                  amd64        Python 3 interface to libapt-pkg
ii  python3-aptdaemon                          1.1.1+bzr982-0ubuntu32.3              all          Python 3 module for the server and client of aptdaemon
ii  python3-aptdaemon.gtk3widgets              1.1.1+bzr982-0ubuntu32.3              all          Python 3 GTK+ 3 widgets to run an aptdaemon client
ii  python3-attr                               19.3.0-2                              all          Attributes without boilerplate (Python 3)
ii  python3-autobahn                           17.10.1+dfsg1-6                       all          WebSocket client and server library, WAMP framework - Python 3.x
ii  python3-automat                            0.8.0-1ubuntu1                        all          Self-service finite-state machines for the programmer on the go
ii  python3-blinker                            1.4+dfsg1-0.3ubuntu1                  all          fast, simple object-to-object and broadcast signaling library
ii  python3-brlapi:amd64                       6.0+dfsg-4ubuntu6                     amd64        Braille display access via BRLTTY - Python3 bindings
ii  python3-bs4                                4.8.2-1                               all          error-tolerant HTML parser for Python 3
ii  python3-cairo:amd64                        1.16.2-2ubuntu2                       amd64        Python3 bindings for the Cairo vector graphics library
ii  python3-cbor                               1.0.0-1.1build1                       amd64        Python3 Implementation of RFC 7049. Concise Binary Object Representation (CBOR)
ii  python3-certifi                            2019.11.28-1                          all          root certificates for validating SSL certs and verifying TLS hosts (python3)
ii  python3-cffi-backend                       1.14.0-1build1                        amd64        Foreign Function Interface for Python 3 calling C code - runtime
ii  python3-chardet                            3.0.4-4build1                         all          universal character encoding detector for Python3
ii  python3-click                              7.0-3                                 all          Wrapper around optparse for command line utilities - Python 3.x
ii  python3-colorama                           0.4.3-1build1                         all          Cross-platform colored terminal text in Python - Python 3.x
ii  python3-commandnotfound                    20.04.5                               all          Python 3 bindings for command-not-found.
ii  python3-configobj                          5.0.6-4                               all          simple but powerful config file reader and writer for Python 3
ii  python3-constantly                         15.1.0-1build1                        all          Symbolic constants in Python
ii  python3-crypto                             2.6.1-13ubuntu2                       amd64        cryptographic algorithms and protocols for Python 3
ii  python3-cryptography                       2.8-3ubuntu0.1                        amd64        Python library exposing cryptographic recipes and primitives (Python 3)
ii  python3-cups                               1.9.73-3build1                        amd64        Python3 bindings for CUPS
ii  python3-cupshelpers                        1.5.12-0ubuntu1.1                     all          Python utility modules around the CUPS printing system
ii  python3-dbus                               1.2.16-1build1                        amd64        simple interprocess messaging system (Python 3 interface)
ii  python3-dbus.mainloop.pyqt5                5.14.1+dfsg-3build1                   amd64        D-Bus Qt main loop support for Python 3
ii  python3-debconf                            1.5.73                                all          interact with debconf from Python 3
ii  python3-debian                             0.1.36ubuntu1                         all          Python 3 modules to work with Debian-related data formats
ii  python3-defer                              1.0.6-2.1                             all          Small framework for asynchronous programming (Python 3)
ii  python3-dev                                3.8.2-0ubuntu2                        amd64        header files and a static library for Python (default)
ii  python3-distro                             1.4.0-1                               all          Linux OS platform information API
ii  python3-distro-info                        0.23ubuntu1                           all          information about distributions' releases (Python 3 module)
ii  python3-distupgrade                        1:20.04.36                            all          manage release upgrades
ii  python3-distutils                          3.8.10-0ubuntu1~20.04                 all          distutils package for Python 3.x
ii  python3-dnspython                          1.16.0-1build1                        all          DNS toolkit for Python 3
ii  python3-entrypoints                        0.3-2ubuntu1                          all          Discover and load entry points from installed packages (Python 3)
ii  python3-feedparser                         5.2.1-2                               all          Universal Feed Parser for Python 3
ii  python3-gdbm:amd64                         3.8.10-0ubuntu1~20.04                 amd64        GNU dbm database support for Python 3.x
ii  python3-geoip                              1.3.2-3build1                         amd64        Python3 bindings for the GeoIP IP-to-country resolver library
ii  python3-gi                                 3.36.0-1                              amd64        Python 3 bindings for gobject-introspection libraries
ii  python3-gi-cairo                           3.36.0-1                              amd64        Python 3 Cairo bindings for the GObject library
ii  python3-gpg                                1.13.1-7ubuntu2                       amd64        Python interface to the GPGME GnuPG encryption library (Python 3)
ii  python3-grpcio                             1.16.1-1ubuntu5                       amd64        GRPC system (Python 3)
ii  python3-gst-1.0                            1.16.2-2                              amd64        GStreamer GObject Introspection overrides for Python (Python 3)
ii  python3-hamcrest                           1.9.0-3                               all          Hamcrest framework for matcher objects (Python 3)
ii  python3-hkdf                               0.0.3-4                               all          HMAC-based Extract-and-Expand Key Derivation Function (HKDF)
ii  python3-html5lib                           1.0.1-2                               all          HTML parser/tokenizer based on the WHATWG HTML5 specification
ii  python3-httplib2                           0.14.0-1ubuntu1                       all          comprehensive HTTP client library written for Python3
ii  python3-humanize                           1.0.0-1                               all          Python Humanize library (Python 3)
ii  python3-hyperlink                          19.0.0-1                              all          Immutable, Pythonic, correct URLs.
ii  python3-ibus-1.0                           1.5.22-2ubuntu2.1                     all          Intelligent Input Bus - introspection overrides for Python (Python 3)
ii  python3-icu                                2.4.2-0ubuntu3                        amd64        Python 3 extension wrapping the ICU C++ API
ii  python3-idna                               2.8-1                                 all          Python IDNA2008 (RFC 5891) handling (Python 3)
ii  python3-ifaddr                             0.1.6-1                               all          Pure Python implementation for detecting IP addresses
ii  python3-imdbpy                             6.8-2                                 all          Python package to access the IMDb's movie database (Python 3)
ii  python3-incremental                        16.10.1-3.2                           all          Library for versioning Python projects.
rc  python3-jsonschema                         3.2.0-0ubuntu2                        all          An(other) implementation of JSON Schema (Draft 3 and 4) - Python 3.x
ii  python3-jwt                                1.7.1-2ubuntu2                        all          Python 3 implementation of JSON Web Token
ii  python3-keyring                            18.0.1-2ubuntu1                       all          store and access your passwords safely - Python 3 version of the package
ii  python3-launchpadlib                       1.10.13-1                             all          Launchpad web services client library (Python 3)
ii  python3-lazr.restfulclient                 0.14.2-2build1                        all          client for lazr.restful-based web services (Python 3)
ii  python3-lazr.uri                           1.0.3-4build1                         all          library for parsing, manipulating, and generating URIs
ii  python3-ldb                                2:2.2.3-0ubuntu0.20.04.2              amd64        Python 3 bindings for LDB
ii  python3-lib2to3                            3.8.10-0ubuntu1~20.04                 all          Interactive high-level object-oriented language (lib2to3)
ii  python3-louis                              3.12.0-3                              all          Python bindings for liblouis
ii  python3-lxml:amd64                         4.5.0-1ubuntu0.3                      amd64        pythonic binding for the libxml2 and libxslt libraries
ii  python3-lz4                                3.0.2+dfsg-1build1                    amd64        Python interface to the lz4 compression library (Python 3)
ii  python3-macaroonbakery                     1.3.1-1                               all          Higher-level macaroon operations for Python 3
ii  python3-magic                              2:0.4.15-3                            all          python3 interface to the libmagic file type identification library
ii  python3-mako                               1.1.0+ds1-1ubuntu2                    all          fast and lightweight templating for the Python 3 platform
ii  python3-markdown                           3.1.1-3                               all          text-to-HTML conversion library/tool (Python 3 version)
ii  python3-markupsafe                         1.1.0-1build2                         amd64        HTML/XHTML/XML string library for Python 3
ii  python3-minimal                            3.8.2-0ubuntu2                        amd64        minimal subset of the Python language (default python3 version)
ii  python3-nacl                               1.3.0-5                               amd64        Python bindings to libsodium (Python 3)
ii  python3-netaddr                            0.7.19-3ubuntu1                       all          manipulation of various common network address notations (Python 3)
ii  python3-netifaces                          0.10.4-1ubuntu4                       amd64        portable network interface information - Python 3.x
ii  python3-nose                               1.3.7-5                               all          test discovery and running for Python3 unittest
ii  python3-notify2                            0.3-4                                 all          desktop notifications API for Python 3
ii  python3-oauthlib                           3.1.0-1ubuntu2                        all          generic, spec-compliant implementation of OAuth for Python3
ii  python3-openssl                            19.0.0-1build1                        all          Python 3 wrapper around the OpenSSL library
ii  python3-packaging                          20.3-1                                all          core utilities for python3 packages
ii  python3-pam                                0.4.2-13.2ubuntu8                     amd64        Python interface to the PAM library
ii  python3-parted                             3.11.2-11.1build1                     amd64        Python 3 interface for libparted
ii  python3-pexpect                            4.6.0-1build1                         all          Python 3 module for automating interactive applications
ii  python3-pil:amd64                          7.0.0-4ubuntu0.4                      amd64        Python Imaging Library (Python3)
ii  python3-pkg-resources                      45.2.0-1                              all          Package Discovery and Resource Access using pkg_resources
ii  python3-png                                0.0.20+ds-2                           all          Pure Python PNG Reader/Writer (Python 3)
ii  python3-problem-report                     2.20.11-0ubuntu27.21                  all          Python 3 library to handle problem reports
ii  python3-protobuf                           3.6.1.3-2ubuntu5                      amd64        Python 3 bindings for protocol buffers
ii  python3-psutil                             5.5.1-1ubuntu4                        amd64        module providing convenience functions for managing processes (Python3)
ii  python3-ptyprocess                         0.6.0-1ubuntu1                        all          Run a subprocess in a pseudo terminal from Python 3
ii  python3-pyasn1                             0.4.2-3build1                         all          ASN.1 library for Python (Python 3 module)
ii  python3-pyasn1-modules                     0.2.1-0.2build1                       all          Collection of protocols modules written in ASN.1 language (Python 3)
ii  python3-pyatspi                            2.36.0-1                              all          Assistive Technology Service Provider Interface - Python3 bindings
ii  python3-pycurl                             7.43.0.2-1ubuntu5                     amd64        Python bindings to libcurl (Python 3)
ii  python3-pygments                           2.3.1+dfsg-1ubuntu2.2                 all          syntax highlighting package written in Python 3
ii  python3-pyinotify                          0.9.6-1.2ubuntu1                      all          simple Linux inotify Python bindings
ii  python3-pymacaroons                        0.13.0-3                              all          Macaroon library for Python 3
ii  python3-pyparsing                          2.4.6-1                               all          alternative to creating and executing simple grammars - Python 3.x
ii  python3-pyqrcode                           1.2.1-4                               all          Python 3 module to generate QR Codes
ii  python3-pyqt5                              5.14.1+dfsg-3build1                   amd64        Python 3 bindings for Qt5
ii  python3-pyxattr                            0.6.1-2                               amd64        module for manipulating filesystem extended attributes (Python3)
ii  python3-reportlab                          3.5.34-1ubuntu1                       all          ReportLab library to create PDF documents using Python3
ii  python3-reportlab-accel:amd64              3.5.34-1ubuntu1                       amd64        C coded extension accelerator for the ReportLab Toolkit
ii  python3-requests                           2.22.0-2ubuntu1                       all          elegant and simple HTTP library for Python3, built for human beings
ii  python3-requests-file                      1.4.3-2                               all          File transport adapter for Requests - Python 3.X
ii  python3-requests-unixsocket                0.2.0-2                               all          Use requests to talk HTTP via a UNIX domain socket - Python 3.x
ii  python3-rfc3339                            1.1-2                                 all          parser and generator of RFC 3339-compliant timestamps (Python 3)
ii  python3-samba                              2:4.13.14+dfsg-0ubuntu0.20.04.4       amd64        Python 3 bindings for Samba
ii  python3-secretstorage                      2.3.1-2ubuntu1                        all          Python module for storing secrets - Python 3.x version
ii  python3-service-identity                   18.1.0-5build1                        all          Service identity verification for pyOpenSSL (Python 3 module)
ii  python3-setproctitle:amd64                 1.1.10-1ubuntu1                       amd64        Setproctitle implementation for Python 3
ii  python3-setuptools                         45.2.0-1                              all          Python3 Distutils Enhancements
ii  python3-simplejson                         3.16.0-2ubuntu2                       amd64        simple, fast, extensible JSON encoder/decoder for Python 3.x
ii  python3-sip                                4.19.21+dfsg-1build1                  amd64        Python 3/C++ bindings generator runtime library
ii  python3-six                                1.14.0-2                              all          Python 2 and 3 compatibility library (Python 3 interface)
ii  python3-snappy                             0.5.3-1.1build1                       amd64        snappy compression library from Google - Python 3.x
ii  python3-soupsieve                          1.9.5+dfsg-1                          all          modern CSS selector implementation for BeautifulSoup (Python 3)
ii  python3-spake2                             0.8-2                                 all          SPAKE2 password-authenticated key exchange (pure python)
ii  python3-speechd                            0.9.1-4                               all          Python interface to Speech Dispatcher
ii  python3-systemd                            234-3build2                           amd64        Python 3 bindings for systemd
ii  python3-talloc:amd64                       2.3.1-0ubuntu0.20.04.1                amd64        hierarchical pool based memory allocator - Python3 bindings
ii  python3-tartube                            2.1.0-1                               all          GUI front-end for youtube-dl
ii  python3-tdb                                1.4.3-0ubuntu0.20.04.1                amd64        Python3 bindings for TDB
ii  python3-tinycss2                           1.0.2-1                               all          Low-level CSS parser (Python3 version)
ii  python3-tldextract                         2.2.1-1                               all          Python library for separating TLDs
ii  python3-tqdm                               4.30.0-1                              all          fast, extensible progress bar for Python 3 and CLI tool
ii  python3-trie                               0.2+ds-2                              all          Pure Python implementation of the trie data structure (Python 3)
ii  python3-twisted                            18.9.0-11ubuntu0.20.04.1              all          Event-based framework for internet applications
ii  python3-twisted-bin:amd64                  18.9.0-11ubuntu0.20.04.1              amd64        Event-based framework for internet applications
ii  python3-txaio                              2.10.0-2                              all          compatibility API between asyncio/Twisted/Trollius - Python 3.x
ii  python3-txtorcon                           19.0.0-2                              all          Twisted-based asynchronous Tor control protocol implementation (Python 3)
ii  python3-tz                                 2019.3-1                              all          Python3 version of the Olson timezone database
ii  python3-u-msgpack                          2.1-1build1                           all          Python3 MessagePack serializer and deserializer
ii  python3-ubjson                             0.14.0-2build1                        amd64        Universal Binary JSON encoder/decoder for Python 3
ii  python3-unidecode                          1.1.1-3build1                         all          ASCII transliterations of Unicode text (Python 3 module)
ii  python3-uno                                1:6.4.7-0ubuntu0.20.04.2              amd64        Python-UNO bridge
ii  python3-update-manager                     1:20.04.10.9                          all          python 3.x module for update-manager
ii  python3-urllib3                            1.25.8-2ubuntu0.1                     all          HTTP library with thread-safe connection pooling for Python3
ii  python3-wadllib                            1.3.3-3build1                         all          Python 3 library for navigating WADL files
ii  python3-webencodings                       0.5.1-1ubuntu1                        all          Python implementation of the WHATWG Encoding standard
ii  python3-wsaccel                            0.6.2-2build1                         amd64        Accelerator for ws4py and AutobahnPython - Python 3.x
ii  python3-xapp                               2.2.1                                 all          Python 3 XApp library
ii  python3-xdg                                0.26-1ubuntu1                         all          Python 3 library to access freedesktop.org standards
ii  python3-xkit                               0.5.0ubuntu4                          all          library for the manipulation of xorg.conf files (Python 3)
ii  python3-xlib                               0.23-2build1                          all          interface for Python 3 to the X11 protocol
ii  python3-xlrd                               1.1.0-5                               all          extract data from Microsoft Excel spreadsheet files (Python3 version)
ii  python3-yaml                               5.3.1-1ubuntu0.1                      amd64        YAML parser and emitter for Python3
ii  python3-zeroconf                           0.24.4-0ubuntu1                       all          Pure Python implementation of multicast DNS service discovery (Python3)
ii  python3-zope.interface                     4.7.1-1                               amd64        Interfaces for Python3
ii  python3.8                                  3.8.10-0ubuntu1~20.04.2               amd64        Interactive high-level object-oriented language (version 3.8)
ii  python3.8-dev                              3.8.10-0ubuntu1~20.04.2               amd64        Header files and a static library for Python (v3.8)
ii  python3.8-minimal                          3.8.10-0ubuntu1~20.04.2               amd64        Minimal subset of the Python language (version 3.8)

Q5. What is the output of “pip freeze” A5. the output is :

properjob@properjob-ThinkPad-X230:~$ pip freeze
/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
apprise==0.9.6
apt-clone==0.2.1
apturl==0.5.2
attrs==19.3.0
autobahn==17.10.1
autokey==0.95.10
Automat==0.8.0
beautifulsoup4==4.8.2
blinker==1.4
Brlapi==0.7.0
bs4==0.0.1
catfish==4.16.0
cbor==1.0.0
certifi==2020.6.20
cffi==1.14.3
changedetection.io==0.39.4
chardet==3.0.4
charset-normalizer==2.0.9
Click==7.0
colorama==0.4.3
coloredlogs==14.0
command-not-found==0.3
configobj==5.0.6
constantly==15.1.0
cryptography==3.4.8
cupshelpers==1.0
cycler==0.10.0
Cython==0.29.14
dbus-python==1.2.16
decorator==4.4.2
defer==1.0.6
distro==1.4.0
distro-info===0.23ubuntu1
dnspython==1.16.0
entrypoints==0.3
eventlet==0.33.0
feedgen==0.9.0
feedparser==5.2.1
Flask==1.1.4
Flask-Login==0.5.0
GeoIP==1.3.2
gpg===1.13.1-unknown
greenlet==1.1.2
grpcio==1.16.1
hkdf==0.0.3
html5lib==1.0.1
httplib2==0.14.0
humanfriendly==8.2
humanize==1.0.0
hyperlink==19.0.0
idna==2.8
ifaddr==0.1.6
imageio==2.9.0
IMDbPY==6.8
img2pdf==0.4.0
imutils==0.5.3
incremental==16.10.1
inscriptis==1.2
itsdangerous==1.1.0
Jinja2==2.11.3
jsonpath-ng==1.5.3
keyring==18.0.1
kiwisolver==1.2.0
launchpadlib==1.10.13
lazr.restfulclient==0.14.2
lazr.uri==1.0.3
louis==3.12.0
lxml==4.5.2
lz4==3.0.2+dfsg
macaroonbakery==1.3.1
Magnus==1.0.3
Mako==1.1.0
Markdown==3.1.1
MarkupSafe==1.1.0
matplotlib==3.3.2
meld==3.20.2
nemo-emblems==5.2.0
netaddr==0.7.19
netifaces==0.10.4
networkx==2.5
nose==1.3.7
notify2==0.3
numpy==1.19.2
oauthlib==3.1.0
ocrmypdf==11.2.1
onboard==1.4.1
opencv-python==4.4.0.44
packaging==20.3
PAM==0.4.2
pdfminer.six==20200726
pexpect==4.6.0
pikepdf==1.19.3
Pillow==7.0.0
pluggy==0.13.1
ply==3.11
protobuf==3.6.1
psutil==5.5.1
py-ubjson==0.14.0
pyasn1==0.4.2
pyasn1-modules==0.2.1
pycairo==1.16.2
pycparser==2.20
pycrypto==2.6.1
pycups==1.9.73
pycurl==7.43.0.2
Pygments==2.3.1
PyGObject==3.36.0
PyHamcrest==1.9.0
PyICU==2.4.2
pyinotify==0.9.6
PyJWT==1.7.1
pymacaroons==0.13.0
PyNaCl==1.3.0
pyOpenSSL==19.0.0
pyparsing==2.4.6
pyparted==3.11.2
PyPDF2==1.26.0
pypng==0.0.20
PyQRCode==1.2.1
PyQt5==5.14.1
pyRFC3339==1.1
PySocks==1.7.1
python-apt==2.0.0+ubuntu0.20.4.6
python-dateutil==2.8.1
python-debian===0.1.36ubuntu1
python-magic==0.4.16
python-snappy==0.5.3
python-xapp==2.2.1
python-xlib==0.23
PyTrie==0.2
pytz==2019.3
PyWavelets==1.1.1
pyxattr==0.6.1
pyxdg==0.26
PyYAML==5.3.1
reportlab==3.5.34
requests==2.26.0
requests-file==1.4.3
requests-oauthlib==1.3.0
requests-unixsocket==0.2.0
scikit-image==0.17.2
scipy==1.5.2
SecretStorage==2.3.1
selenium==3.141.0
service-identity==18.1.0
setproctitle==1.1.10
simplejson==3.16.0
sip==4.19.21
six==1.14.0
sortedcontainers==2.2.2
soupsieve==1.9.5
spake2==0.8
systemd-python==234
tartube==2.1.0
tesserocr==2.5.1
tifffile==2020.10.1
timeago==1.0.15
tinycss2==1.0.2
tldextract==2.2.1
tqdm==4.30.0
Twisted==18.9.0
txaio==2.10.0
txtorcon==19.0.0
typecatcher==0.3
u-msgpack-python==2.1
ubuntu-advantage-tools==27.4
ubuntu-drivers-common==0.0.0
ufw==0.36
Unidecode==1.1.1
urllib3==1.26.7
validators==0.18.2
wadllib==1.3.3
webencodings==0.5.1
Werkzeug==1.0.1
wsaccel==0.6.2
WTForms==2.3.3
xkit==0.0.0
xlrd==1.1.0
youtube-dl==2021.4.26
zeroconf==0.24.4
zope.interface==4.7.1
juglanshub commented 2 years ago

Attached /var/log/syslog issue_10591_syslog.txt

leigh123linux commented 2 years ago

Running pip3 (pip) with elevated privileges overwrites the system installed packages.

clefebvre commented 2 years ago

Not so fast... we might want to do something about it. I wanted an issue about this personally so we could look into it during the week.

mtwebster commented 2 years ago

Can you run:

python3 -v  /usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py

and report the output?

Thanks

juglanshub commented 2 years ago

Q6. Can you run following command & report output:

python3 -v  /usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py

A6. as the output is large, please see attached file

cheers issue_10591output python3_-v_cinnamonsettings.txt

M-MAD-Official commented 2 years ago

This happened to me too. I upgraded form 20.1 to 20.3 But I get this error: "No module named 'requests'"

M-MAD-Official commented 2 years ago

I finally managed to fix this; You need to remove the package cinnamon-settings nags about using pip3 with root privileges Run: sudo -H pip3 uninstall certifi Then reinstall certifi using apt this time; sudo apt reinstall python3-certifi

cinnamon-settings should work now

In my case I did this for requests, but in your case, you have to follow the instructions for certifi

juglanshub commented 2 years ago

Many thanks for the fix. Ran both commands and now cinnamon system settings, system info & startup applications are all working fine.

Your help is much appreciated. Cheers

M-MAD-Official commented 2 years ago

I propose @clefebvre to put explanation about this issue and it's formulated solution somewhere in 20.3 Upgrade Guide and future Upgrade Guides.

spamegg1 commented 2 years ago

See also #10572 #10579

clefebvre commented 2 years ago

So, even though we have a workaround.

We still need to assess how/why the upgrade to 20.3 triggered this situation.

And on the cinnamon side of things, we're currently filtering/forbidding the use of .local in cinnamon-settings. We did that to address pip versions of PIL which made it segfault. But most apps don't do that, so we're deviating from normal behavior. I think we need to talk about this again. Obviously there's an issue either way.. whether .local is in or not.

Typically here, even though we don't use .local, it still hides away system modules, so that's not OK.

juglanshub commented 2 years ago

very sound approach Clem, my sentimentals also. Thanks for your diligence.

M-MAD-Official commented 2 years ago

@clefebvre I believe this problem is not related to cinnamon because not every users who upgraded had the same problem; I don't know about @juglanshub, but I admit this problem was caused by my bad practice in maintaining my system. I installed some packages using pip as root, it's a terrible practice as pip itself told me: "WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behavior with the system package manager. It is recommended to use a virtual environment instead...", but I ignored the warning because I had a backup and was unaware about possible consequences. The moment I became aware, I uninstalled every package I had manually installed with pip as root and reinstalled them in virtual environments as Python documentation guided. I think the best treatment to this issue is to inform users about the problem, it's cause and it's solution by explaining in Release notes and/or Upgrade guides.

mtwebster commented 2 years ago

Hi, I've been trying to work out a script that can resolve this issue when it crops up. Unfortunately it's a bit of a challenge for me to truly reproduce the problem in the first place, so hopefully I can catch someone here to test it (maybe one of you who's skirted around our 'path adjustments').

What I have so far, is it tries to detect modules installed by both the system package manager (like apt or dnf), and those installed by other means, such as pip. It then reinstalls the system versions of these packages.

It's non-destructive - it only attempts to reinstall system packages (it won't install or remove anything unless a package has newly-added dependencies or conflicts, which is unlikely).

To try it:

curl https://gist.githubusercontent.com/mtwebster/eec06bb6fa1385ff05cf9624c4c6c414/raw/6fa3b61ec072d65bfd061ece5a697ea09e965564/cinnamon-fix-python-modules > cinnamon-fix-python-modules

chmod +x cinnamon-fix-python-modules

# In mint/ubuntu:
./cinnamon-fix-python-modules apt
# fedora:
./cinnamon-fix-python-modules rpm

You'll need pip3 installed - it'll prompt you to do so if necessary.

Thanks a lot!

juglanshub commented 2 years ago

Hi mtwester Ran your commands 3 times 1st run - with python3-pip uninstalled, (thats according to software manager). I had already uninstalled it after having the issue.
Note that I did NOT receive a prompt to install pip3. 2nd run - ran the commands for a second time. The assumption being that the 'possible module conflicts' might disappear, after having the system modules reinstalled. However, comparing both output runs 1 & 2, the Possible module conflicts remained the same. 3rd run - final run after reinstalling python3-pip via software manager. Note that the system settings launch issue has NOT returned, but there again I am already running LM20.3

results of all 3 runs as follows:

-------------1st Run------------------------------------

properjob@properjob-ThinkPad-X230:~$ curl https://gist.githubusercontent.com/mtwebster/eec06bb6fa1385ff05cf9624c4c6c414/raw/6fa3b61ec072d65bfd061ece5a697ea09e965564/cinnamon-fix-python-modules > cinnamon-fix-python-modules
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3732  100  3732    0     0   8202      0 --:--:-- --:--:-- --:--:--  8202
properjob@properjob-ThinkPad-X230:~$ chmod +x cinnamon-fix-python-modules
properjob@properjob-ThinkPad-X230:~$ ./cinnamon-fix-python-modules apt
What this does...

1 - Gather a list of all python3 modules on the system.
2 - Filter out all non-system-managed modules.
3 - Look for installed, system-managed python modules whose names are included in that filtered list.

Enter to proceed

Gathering all python3 module names...
Found apprise
Found bs4
Found cffi
Found changedetection.io
Found charset-normalizer
Found coloredlogs
Found cryptography
Found cycler
Found decorator
Found eventlet
Found feedgen
Found Flask
Found Flask-Login
Found greenlet
Found humanfriendly
Found imageio
Found img2pdf
Found imutils
Found inscriptis
Found itsdangerous
Found Jinja2
Found jsonpath-ng
Found kiwisolver
Found lxml
Found matplotlib
Found networkx
Found numpy
Found ocrmypdf
Found opencv-python
Found pdfminer.six
Found pikepdf
Found pip
Found pluggy
Found ply
Found pycparser
Found PyPDF2
Found PySocks
Found python-dateutil
Found PyWavelets
Found requests
Found requests-oauthlib
Found scikit-image
Found scipy
Found selenium
Found setuptools
Found sortedcontainers
Found tesserocr
Found tifffile
Found timeago
Found urllib3
Found validators
Found Werkzeug
Found WTForms

Now comparing those against system packages...

Possible module conflict: bs4 -> python3-bs4
Possible module conflict: cryptography -> python3-cryptography
Possible module conflict: lxml -> python3-lxml
Possible module conflict: requests -> python3-requests
Possible module conflict: setuptools -> python3-setuptools
Possible module conflict: urllib3 -> python3-urllib3

Will now use apt to re-install the system versions of these packages:

apt reinstall python3-bs4 python3-cryptography python3-lxml python3-requests python3-setuptools python3-urllib3

Enter to proceed (or hit ctrl-c now to abort)

[sudo] password for properjob:               
The following packages will be REINSTALLED:
  python3-bs4 python3-cryptography python3-lxml python3-requests python3-setuptools 
  python3-urllib3 
0 packages upgraded, 0 newly installed, 6 reinstalled, 0 to remove and 8 not upgraded.
Need to get 759 kB/2,143 kB of archives. After unpacking 0 B will be used.
Get: 1 http://archive.ubuntu.com/ubuntu focal/main amd64 python3-requests all 2.22.0-2ubuntu1 [47.1 kB]
Get: 2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-urllib3 all 1.25.8-2ubuntu0.1 [88.3 kB]
Get: 3 http://archive.ubuntu.com/ubuntu focal/main amd64 python3-bs4 all 4.8.2-1 [83.0 kB]
Get: 4 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 python3-cryptography amd64 2.8-3ubuntu0.1 [211 kB]
Get: 5 http://archive.ubuntu.com/ubuntu focal/main amd64 python3-setuptools all 45.2.0-1 [330 kB]
Fetched 759 kB in 1s (1,153 kB/s)           
(Reading database ... 389506 files and directories currently installed.)
Preparing to unpack .../python3-requests_2.22.0-2ubuntu1_all.deb ...
Unpacking python3-requests (2.22.0-2ubuntu1) over (2.22.0-2ubuntu1) ...
Preparing to unpack .../python3-urllib3_1.25.8-2ubuntu0.1_all.deb ...
Unpacking python3-urllib3 (1.25.8-2ubuntu0.1) over (1.25.8-2ubuntu0.1) ...
Setting up python3-urllib3 (1.25.8-2ubuntu0.1) ...
Setting up python3-requests (2.22.0-2ubuntu1) ...
(Reading database ... 389506 files and directories currently installed.)
Preparing to unpack .../python3-bs4_4.8.2-1_all.deb ...
Unpacking python3-bs4 (4.8.2-1) over (4.8.2-1) ...
Preparing to unpack .../python3-cryptography_2.8-3ubuntu0.1_amd64.deb ...
Unpacking python3-cryptography (2.8-3ubuntu0.1) over (2.8-3ubuntu0.1) ...
Preparing to unpack .../python3-lxml_4.5.0-1ubuntu0.5_amd64.deb ...
Unpacking python3-lxml:amd64 (4.5.0-1ubuntu0.5) over (4.5.0-1ubuntu0.5) ...
Preparing to unpack .../python3-setuptools_45.2.0-1_all.deb ...
Unpacking python3-setuptools (45.2.0-1) over (45.2.0-1) ...
Setting up python3-setuptools (45.2.0-1) ...
Setting up python3-bs4 (4.8.2-1) ...
Setting up python3-cryptography (2.8-3ubuntu0.1) ...
Setting up python3-lxml:amd64 (4.5.0-1ubuntu0.5) ...

Success!

---------2nd Run below----------------------

properjob@properjob-ThinkPad-X230:~$ curl https://gist.githubusercontent.com/mtwebster/eec06bb6fa1385ff05cf9624c4c6c414/raw/6fa3b61ec072d65bfd061ece5a697ea09e965564/cinnamon-fix-python-modules > cinnamon-fix-python-modules
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3732  100  3732    0     0   7554      0 --:--:-- --:--:-- --:--:--  7569
properjob@properjob-ThinkPad-X230:~$ chmod +x cinnamon-fix-python-modules
properjob@properjob-ThinkPad-X230:~$ ./cinnamon-fix-python-modules apt
What this does...

1 - Gather a list of all python3 modules on the system.
2 - Filter out all non-system-managed modules.
3 - Look for installed, system-managed python modules whose names are included in that filtered list.

Enter to proceed

Gathering all python3 module names...
Found apprise
Found bs4
Found cffi
Found changedetection.io
Found charset-normalizer
Found coloredlogs
Found cryptography
Found cycler
Found decorator
Found eventlet
Found feedgen
Found Flask
Found Flask-Login
Found greenlet
Found humanfriendly
Found imageio
Found img2pdf
Found imutils
Found inscriptis
Found itsdangerous
Found Jinja2
Found jsonpath-ng
Found kiwisolver
Found lxml
Found matplotlib
Found networkx
Found numpy
Found ocrmypdf
Found opencv-python
Found pdfminer.six
Found pikepdf
Found pip
Found pluggy
Found ply
Found pycparser
Found PyPDF2
Found PySocks
Found python-dateutil
Found PyWavelets
Found requests
Found requests-oauthlib
Found scikit-image
Found scipy
Found selenium
Found setuptools
Found sortedcontainers
Found tesserocr
Found tifffile
Found timeago
Found urllib3
Found validators
Found Werkzeug
Found WTForms

Now comparing those against system packages...

Possible module conflict: bs4 -> python3-bs4
Possible module conflict: cryptography -> python3-cryptography
Possible module conflict: lxml -> python3-lxml
Possible module conflict: requests -> python3-requests
Possible module conflict: setuptools -> python3-setuptools
Possible module conflict: urllib3 -> python3-urllib3

Will now use apt to re-install the system versions of these packages:

apt reinstall python3-bs4 python3-cryptography python3-lxml python3-requests python3-setuptools python3-urllib3

Enter to proceed (or hit ctrl-c now to abort)

The following packages will be REINSTALLED:
  python3-bs4 python3-cryptography python3-lxml python3-requests python3-setuptools 
  python3-urllib3 
0 packages upgraded, 0 newly installed, 6 reinstalled, 0 to remove and 8 not upgraded.
Need to get 0 B/2,143 kB of archives. After unpacking 0 B will be used.
(Reading database ... 389506 files and directories currently installed.)
Preparing to unpack .../python3-requests_2.22.0-2ubuntu1_all.deb ...
Unpacking python3-requests (2.22.0-2ubuntu1) over (2.22.0-2ubuntu1) ...
Preparing to unpack .../python3-urllib3_1.25.8-2ubuntu0.1_all.deb ...
Unpacking python3-urllib3 (1.25.8-2ubuntu0.1) over (1.25.8-2ubuntu0.1) ...
Setting up python3-urllib3 (1.25.8-2ubuntu0.1) ...
Setting up python3-requests (2.22.0-2ubuntu1) ...
(Reading database ... 389506 files and directories currently installed.)
Preparing to unpack .../python3-bs4_4.8.2-1_all.deb ...
Unpacking python3-bs4 (4.8.2-1) over (4.8.2-1) ...
Preparing to unpack .../python3-cryptography_2.8-3ubuntu0.1_amd64.deb ...
Unpacking python3-cryptography (2.8-3ubuntu0.1) over (2.8-3ubuntu0.1) ...
Preparing to unpack .../python3-lxml_4.5.0-1ubuntu0.5_amd64.deb ...
Unpacking python3-lxml:amd64 (4.5.0-1ubuntu0.5) over (4.5.0-1ubuntu0.5) ...
Preparing to unpack .../python3-setuptools_45.2.0-1_all.deb ...
Unpacking python3-setuptools (45.2.0-1) over (45.2.0-1) ...
Setting up python3-setuptools (45.2.0-1) ...
Setting up python3-bs4 (4.8.2-1) ...
Setting up python3-cryptography (2.8-3ubuntu0.1) ...
Setting up python3-lxml:amd64 (4.5.0-1ubuntu0.5) ...

Success!

----------3rd Run below--------

What this does...

1 - Gather a list of all python3 modules on the system.
2 - Filter out all non-system-managed modules.
3 - Look for installed, system-managed python modules whose names are included in that filtered list.

Enter to proceed

Gathering all python3 module names...
Found apprise
Found bs4
Found cffi
Found changedetection.io
Found charset-normalizer
Found coloredlogs
Found cryptography
Found cycler
Found decorator
Found eventlet
Found feedgen
Found Flask
Found Flask-Login
Found greenlet
Found humanfriendly
Found imageio
Found img2pdf
Found imutils
Found inscriptis
Found itsdangerous
Found Jinja2
Found jsonpath-ng
Found kiwisolver
Found lxml
Found matplotlib
Found networkx
Found numpy
Found ocrmypdf
Found opencv-python
Found pdfminer.six
Found pikepdf
Found pip
Found pluggy
Found ply
Found pycparser
Found PyPDF2
Found PySocks
Found python-dateutil
Found PyWavelets
Found requests
Found requests-oauthlib
Found scikit-image
Found scipy
Found selenium
Found setuptools
Found sortedcontainers
Found tesserocr
Found tifffile
Found timeago
Found urllib3
Found validators
Found Werkzeug
Found WTForms

Now comparing those against system packages...

Possible module conflict: bs4 -> python3-bs4
Possible module conflict: cryptography -> python3-cryptography
Possible module conflict: lxml -> python3-lxml
Possible module conflict: pip -> python3-pip
Possible module conflict: requests -> python3-requests
Possible module conflict: setuptools -> python3-setuptools
Possible module conflict: urllib3 -> python3-urllib3

Will now use apt to re-install the system versions of these packages:

apt reinstall python3-bs4 python3-cryptography python3-lxml python3-pip python3-requests python3-setuptools python3-urllib3

Enter to proceed (or hit ctrl-c now to abort)

The following packages will be REINSTALLED:
  python3-bs4 python3-cryptography python3-lxml python3-pip python3-requests 
  python3-setuptools python3-urllib3 
0 packages upgraded, 0 newly installed, 7 reinstalled, 0 to remove and 8 not upgraded.
Need to get 0 B/2,373 kB of archives. After unpacking 0 B will be used.
(Reading database ... 389735 files and directories currently installed.)
Preparing to unpack .../python3-requests_2.22.0-2ubuntu1_all.deb ...
Unpacking python3-requests (2.22.0-2ubuntu1) over (2.22.0-2ubuntu1) ...
Preparing to unpack .../python3-urllib3_1.25.8-2ubuntu0.1_all.deb ...
Unpacking python3-urllib3 (1.25.8-2ubuntu0.1) over (1.25.8-2ubuntu0.1) ...
Setting up python3-urllib3 (1.25.8-2ubuntu0.1) ...
Setting up python3-requests (2.22.0-2ubuntu1) ...
(Reading database ... 389735 files and directories currently installed.)
Preparing to unpack .../python3-bs4_4.8.2-1_all.deb ...
Unpacking python3-bs4 (4.8.2-1) over (4.8.2-1) ...
Preparing to unpack .../python3-cryptography_2.8-3ubuntu0.1_amd64.deb ...
Unpacking python3-cryptography (2.8-3ubuntu0.1) over (2.8-3ubuntu0.1) ...
Preparing to unpack .../python3-lxml_4.5.0-1ubuntu0.5_amd64.deb ...
Unpacking python3-lxml:amd64 (4.5.0-1ubuntu0.5) over (4.5.0-1ubuntu0.5) ...
Preparing to unpack .../python3-pip_20.0.2-5ubuntu1.6_all.deb ...
Unpacking python3-pip (20.0.2-5ubuntu1.6) over (20.0.2-5ubuntu1.6) ...
Preparing to unpack .../python3-setuptools_45.2.0-1_all.deb ...
Unpacking python3-setuptools (45.2.0-1) over (45.2.0-1) ...
Setting up python3-setuptools (45.2.0-1) ...
Setting up python3-bs4 (4.8.2-1) ...
Setting up python3-cryptography (2.8-3ubuntu0.1) ...
Setting up python3-pip (20.0.2-5ubuntu1.6) ...
Setting up python3-lxml:amd64 (4.5.0-1ubuntu0.5) ...
Processing triggers for man-db (2.9.1-1) ...

Success!

hope this helps. happy to assist again if you need me.

mtwebster commented 2 years ago

@juglanshub The script will always find potential conflicts - it's just comparing names of system and pip packages, and making sure the system ones are where they belong, so when you run cinnamon-settings, and ~/.local and /usr/local packages are forbidden, it will run as it should.

You probably had a pip version of pip installed, which is why it didn't prompt you to install python3-pip the first time. The pip version used isn't that important. The issue should have hopefully been fixed after the first run.

Thanks! I'll wait for maybe a bit more feedback before making this 'official'.

M-MAD-Official commented 2 years ago

@mtwebster First I want to really appreciate your work about automating the solution But I think comparing names of system and pip packages is not related; the script should compare version numbers, and execute sudo pip3 uninstall <pkg> and then reinstall the package.

The reason behind these are: 1- I can see packages like ubuntu-advantage-tools, ubuntu-drivers-common, and usb-creator installed in output of sudo pip3 list and as you can see their name do not follow the python3-<pkg> pattern, the script will think they are in conflict; another thing to notice is if pip-managed packages have same version as system-managed ones, they do not conflict. 2- As you can see in Q3 in Q&A section of the first message in this issue, just reinstalling conflicting packages using apt not worked:

Q3. you might have a conflict between system python modules and user installed ones (via pip). my guess is that your version of python3-requests is pip’s. Can you try to apt install python3-requests ?

i then used Synaptic to successfully reinstall python3-requests, python3-requests-file & python3-requests-unixsocket. restarted machine but still unable to launch system settings.

You have to uninstall them first with root privileges using pip, then reinstalling using apt.

ghost commented 2 years ago

Rilevo lo stesso problema e ho trovato online questa soluzione:

Nel file /usr/share/cinnamon/cinnamon-settings/bin/util.py ho commentato le righe 9 e 10:

    if path.startswith(("/usr/local", os.path.expanduser("~/.local"))):
        continue
poldon commented 2 years ago

I'm having the same issue with No module named 'certifi' as the error. @clefebvre should I go ahead and try and fix it, or do you need more info from my installation to learn more?

spamegg1 commented 2 years ago

@poldon I believe in your case it would be apt reinstall python3-certifi

poldon commented 2 years ago

I finally managed to fix this; You need to remove the package cinnamon-settings nags about using pip3 with root privileges Run: sudo -H pip3 uninstall certifi Then reinstall certifi using apt this time; sudo apt reinstall python3-certifi

cinnamon-settings should work now

In my case I did this for requests, but in your case, you have to follow the instructions for certifi

Yes, this solution worked for me also. I'm not sure how my installation was different other than maybe being caused by me installing some other application. Also, not sure if it matters, but I'm on a system that has been upgraded with each new release starting with LM 18. Thanks for the solution!

bramar commented 1 year ago

It is never too late to tell @mtwebster that his script works like a charm. I had a problem starting cinnamon-settings because of pytz module, and his script fixed everything. I just had to run it once, and the script offered me to reinstall some Pythong packages. After the reinstallation of the packages, everything started to work again. This is on Mint Cinnamon 20.3.

rosyth commented 1 month ago

Hi, I've also encountered the problem of cinnamon-settings failing to run from the menu, I then tried from the cli and get this.

$ cinnamon-settings
Traceback (most recent call last):
  File "/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py", line 743, in <module>
    window = MainWindow()
  File "/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py", line 316, in __init__
    for module in modules:
  File "/usr/share/cinnamon/cinnamon-settings/modules/cs_calendar.py", line 6, in <module>
    import pytz
ModuleNotFoundError: No module named 'pytz'

However if I run python3 -m pip install pytz I get the message that it is up to date.

I'm not sure what changed when settings stopped working, but after a little investigation I could 'fix' 90% of the problem. I commented out #import pytz in the file "/usr/share/cinnamon/cinnamon-settings/modules/cs_calendar.py". I bit drastic, but settings works again (except for set data/time, which is to be expected).

Looking a bit further back into "/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py", I see this line, #util.strip_syspath_locals() After I comment out this line, I get a fully (I hope) working cinnamon-settings.

Clearly, I don't know what I'm doing, but it works for the present. I'd appreciate someone informing me what the impact ofutil.strip_syspath.locals()does, and why does commenting it work? Thanks.

spamegg1 commented 1 month ago

However if I run python3 -m pip install pytz I get the message that it is up to date.

Usually pip version can interfere with the apt version. Can you try apt reinstall python3-tz (after undoing the changes you made to the code)?

Generally speaking you never want to install anything ever from pip. This is fixed in the next Debian / Ubuntu / Mint version, which will give an error message telling you to use pip with a virtual environment, or use pipx.

rosyth commented 1 month ago

@spamegg1 Yes that fixed it, thanks. My problem was using aptitude which was refusing to find pytz, I missed the key 'python3-tz' bit. So SOLVED... And Yes, I'll need to try and start using python environments :-)

spamegg1 commented 1 month ago

Check out PyEnv, I made a tutorial https://forums.linuxmint.com/viewtopic.php?f=42&p=2103213

rosyth commented 1 month ago

Thanks, will do. I'm about to do a clean upgrade to Mint 21. So will use PyEnv religiously for my own little scripts. I hope spyder works with PyEmv.