• Python broken after recent update


    A few days ago my system was updated via Package Manager. During update, it “complained” something about python, but I can’ remember the exact message.

    Since then, python scripts don’t work. For example, I have Rummage ( https://facelessuser.github.io/Rummage/ ) installed, which worked great. Now, it doesn’t even start. Typing “rummage” displays this error:

    Traceback (most recent call last):
      File "/usr/bin/rummage", line 6, in <module>
        from pkg_resources import load_entry_point
      File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3095, in <module>
        @_call_aside
      File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3079, in _call_aside
        f(*args, **kwargs)
      File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set
        working_set = WorkingSet._build_master()
      File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 570, in _build_master
        ws.require(__requires__)
      File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 888, in require
        needed = self.resolve(parse_requirements(requirements))
      File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 774, in resolve
        raise DistributionNotFound(req, requirers)
    pkg_resources.DistributionNotFound: The 'rummage==4.2.1' distribution was not found and is required by the application
    

    Trying to do “pip install rummage” or “pip install --upgrade rummage” ends with hundreds of errors…

    ../../../../sip/cpp/sip_corecmodule.cpp: In function ‘PyObject* func_Usleep(PyObject*, PyObject*, PyObject*)’:
        ../../../../sip/cpp/sip_corecmodule.cpp:10185:34: warning: ‘void wxUsleep(long unsigned int)’ is deprecated [-Wdeprecated-declarations]
                     wxUsleep(milliseconds);
                                          ^
        In file included from ../../../../ext/wxWidgets/include/wx/wx.h:14,
                         from ../../../../src/wxpy_api.h:41,
                         from ../../../../sip/cpp/sipAPI_core.h:19408,
                         from ../../../../sip/cpp/sip_corecmodule.cpp:10:
        ../../../../ext/wxWidgets/include/wx/utils.h:491:37: note: declared here
         wxDEPRECATED( WXDLLIMPEXP_BASE void wxUsleep(unsigned long milliseconds) );
                                             ^~~~~~~~
        ../../../../ext/wxWidgets/include/wx/defs.h:654:43: note: in definition of macro ‘wxDEPRECATED’
         #define wxDEPRECATED(x) wxDEPRECATED_DECL x
                                                   ^
        ../../../../sip/cpp/sip_corecmodule.cpp:10185:34: warning: ‘void wxUsleep(long unsigned int)’ is deprecated [-Wdeprecated-declarations]
                     wxUsleep(milliseconds);
                                          ^
        In file included from ../../../../ext/wxWidgets/include/wx/wx.h:14,
                         from ../../../../src/wxpy_api.h:41,
                         from ../../../../sip/cpp/sipAPI_core.h:19408,
                         from ../../../../sip/cpp/sip_corecmodule.cpp:10:
        ../../../../ext/wxWidgets/include/wx/utils.h:491:37: note: declared here
         wxDEPRECATED( WXDLLIMPEXP_BASE void wxUsleep(unsigned long milliseconds) );
                                             ^~~~~~~~
        ../../../../ext/wxWidgets/include/wx/defs.h:654:43: note: in definition of macro ‘wxDEPRECATED’
         #define wxDEPRECATED(x) wxDEPRECATED_DECL x
    
    
    ...
    
    
    collect2: error: ld returned 1 exit status
        lto-wrapper: fatal error: /usr/bin/g++ returned 1 exit status
        compilation terminated.
        /usr/bin/ld: error: lto-wrapper failed
        collect2: error: ld returned 1 exit status
        
        ../../../../sip/cpp/sip_advwxPropertySheetDialog.cpp:2713:2: fatal error: error writing to /tmp/ccMrTUSD.s: No space left on device
         };
          ^
        compilation terminated.
        
        Waf: Leaving directory `/tmp/pip-install-ca8hqynd/wxpython/build/waf/3.7/gtk3'
        Build failed
         -> task in '_core' failed with exit status 1 (run with -v to display more information)
         -> task in '_adv' failed with exit status 1 (run with -v to display more information)
        Command '"/usr/bin/python" /tmp/pip-install-ca8hqynd/wxpython/bin/waf-2.0.7 --wx_config=/tmp/pip-install-ca8hqynd/wxpython/build/wxbld/gtk3/wx-config --gtk3 --python="/usr/bin/python" --out=build/waf/3.7/gtk3 configure build ' failed with exit code 1.
        Finished command: build_py (3m49.507s)
        Finished command: build (5m36.694s)
        Command '"/usr/bin/python" -u build.py build' failed with exit code 1.
        
        ----------------------------------------
    Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ca8hqynd/wxpython/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-5yzm2i01/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-ca8hqynd/wxpython/
    

    It looks I’m not the only, multiple complains appeared recently:

    https://bbs.archlinux.org/viewtopic.php?id=239130
    https://bbs.archlinux.org/viewtopic.php?id=239243

    Re-installing python didn’t help. Any ideas what to look for?

  • may this is caused also by latest glibc update and python…

  • Any ideas on how to fix it, or just patiently wait for another update? I guess I’ll need to use KFind now…

  • Hi,

    I can’t help with the error… but to check the pacman error that you didn’t catch, look for the pacman log. It’s in /var/log/pacman.log

    Tell us if you see something in that file.

  • Checked the log, but it looks message isn’t there. In fact, it wasn’t an error. It was a popup saying that some dependencies will need to be removed, IIRC.

  • Got it fixed. Since Arch forums are now full of “please help, python broken!” posts after recent update, I hope someone will find my solution useful.

    The issue in my case was related to wxpython. For some reason, it couldn’t be installed via pip (as you see in the errors). So I opened Package Manager and searched for wxpython. Sure enough, it wasn’t installed. I tried to install it, and got a bunch of errors about existing directories in /usr/bin. So I removed those directories, and wxpython was installed fine.

    Then, installing Rummage took about 5 seconds via pip, and everything works great again.

broken33 python14 Posts 6Views 401
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.