LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-01-2025, 09:36 PM   #1
dwlamb
LQ Newbie
 
Registered: Apr 2012
Posts: 15

Rep: Reputation: Disabled
Python broken after installing app using Homebrew Linux


I used `brew` to install `bfg` - the `git` utility to rewrite history upon removing files or directories from a repository. It's been a while since I added anything to `brew` and `brew` did several changes to my set-up, breaking it. I can't run Back In Time or other apps running python or other packages installed with brew.

Running Back In Time in debug at the command line yields:

Code:
$ backintime --debug
/usr/share/backintime/common/config.py:122: SyntaxWarning: invalid escape sequence '\$'
  DEFAULT_SSH_PREFIX = 'PATH=/opt/bin:/opt/sbin:\$PATH'
/usr/share/backintime/common/tools.py:959: SyntaxWarning: invalid escape sequence '\s'
  c = re.compile(b'.*\sUUID="([^"]*)".*')
/usr/share/backintime/common/tools.py:970: SyntaxWarning: invalid escape sequence '\S'
  c = re.compile(b'.*?ID_FS_UUID=(\S+)')
Traceback (most recent call last):
  File "/usr/share/backintime/common/backintime.py", line 27, in <module>
    import config
  File "/usr/share/backintime/common/config.py", line 32, in <module>
    import tools
  File "/usr/share/backintime/common/tools.py", line 54, in <module>
    import dbus
ModuleNotFoundError: No module named 'dbus'
Using Duck AI I submitted backintime --debug ModuleNotFoundError: No module named 'debus'. It came back with run `pip install dbus-python`.

This is the result of that command:
Code:
$ pip install debus-python
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement debus-python (from versions: none)
ERROR: No matching distribution found for debus-python
If I elevate privileges using `sudo`, this is the result:
Code:
$ sudo pip install debus-python
[sudo] password for daniel: 
ERROR: Could not find a version that satisfies the requirement debus-python (from versions: none)
ERROR: No matching distribution found for debus-python
What is the correct step(s) to resolving this? I am not a python developer and really stuck.
 
Old 08-01-2025, 11:51 PM   #2
lvm_
Senior Member
 
Registered: Jul 2020
Posts: 1,880

Rep: Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637
It's not debus-python
 
Old 08-02-2025, 12:55 AM   #3
dwlamb
LQ Newbie
 
Registered: Apr 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
@lvm Thanks for the correction

As documented farther down there is a problem with `debus` but the output of the debug switch was `dbus`. It was not a typo or misinterpretation on my part. Duck-AI recommended `dbus-python`

Code:
$ backintime --debug
/usr/share/backintime/common/config.py:122: SyntaxWarning: invalid escape sequence '\$'
  DEFAULT_SSH_PREFIX = 'PATH=/opt/bin:/opt/sbin:\$PATH'
/usr/share/backintime/common/tools.py:959: SyntaxWarning: invalid escape sequence '\s'
  c = re.compile(b'.*\sUUID="([^"]*)".*')
/usr/share/backintime/common/tools.py:970: SyntaxWarning: invalid escape sequence '\S'
  c = re.compile(b'.*?ID_FS_UUID=(\S+)')
Traceback (most recent call last):
  File "/usr/share/backintime/common/backintime.py", line 27, in <module>
    import config
  File "/usr/share/backintime/common/config.py", line 32, in <module>
    import tools
  File "/usr/share/backintime/common/tools.py", line 54, in <module>
    import dbus
ModuleNotFoundError: No module named 'dbus'
I used `sudo` for `pip install debus` yielded errors indicating normal site-packages is not writeable
Code:
$ sudo pip install debus
Collecting debus
  Using cached debus-0.1.12.1.tar.gz (124 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: lxml in /usr/lib/python3/dist-packages (from debus) (4.8.0)
Building wheels for collected packages: debus
  Building wheel for debus (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [154 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.10
      creating build/lib.linux-x86_64-3.10/debus
      copying debus/__init__.py -> build/lib.linux-x86_64-3.10/debus
      copying debus/connection.py -> build/lib.linux-x86_64-3.10/debus
      copying debus/message.py -> build/lib.linux-x86_64-3.10/debus
      copying debus/objects.py -> build/lib.linux-x86_64-3.10/debus
      copying debus/buses.py -> build/lib.linux-x86_64-3.10/debus
      copying debus/wire.py -> build/lib.linux-x86_64-3.10/debus
      copying debus/subscription.py -> build/lib.linux-x86_64-3.10/debus
      copying debus/types.py -> build/lib.linux-x86_64-3.10/debus
      creating build/lib.linux-x86_64-3.10/debus/freedesktop
      copying debus/freedesktop/__init__.py -> build/lib.linux-x86_64-3.10/debus/freedesktop
      copying debus/freedesktop/introspect.py -> build/lib.linux-x86_64-3.10/debus/freedesktop
      running build_ext
      building 'debus.marshalling' extension
      creating build/temp.linux-x86_64-3.10
      creating build/temp.linux-x86_64-3.10/debus
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.10 -c debus/marshalling.c -o build/temp.linux-x86_64-3.10/debus/marshalling.o
      debus/marshalling.c: In function ‘__pyx_f_5debus_11marshalling_11InputBuffer_pop_primitive’:
      debus/marshalling.c:5911:76: warning: array subscript has type ‘char’ [-Wchar-subscripts]
       5911 |           __pyx_v_primitive_size = (__pyx_v_5debus_11marshalling_alignments[__pyx_v_signature]);
            |                                                                            ^
      debus/marshalling.c: In function ‘__pyx_f_5debus_11marshalling_12OutputBuffer_put_single’:
      debus/marshalling.c:13823:74: warning: array subscript has type ‘char’ [-Wchar-subscripts]
      13823 |                 __pyx_v_t_size = (__pyx_v_5debus_11marshalling_alignments[__pyx_v_dtype]);
            |                                                                          ^
      debus/marshalling.c: In function ‘__pyx_f_5debus_11marshalling_get_alignment’:
      debus/marshalling.c:16618:55: warning: array subscript has type ‘char’ [-Wchar-subscripts]
      16618 |     __pyx_r = (__pyx_v_5debus_11marshalling_alignments[__pyx_v_t]);
            |                                                       ^
      debus/marshalling.c: In function ‘__Pyx_modinit_type_init_code’:
      debus/marshalling.c:19899:50: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
      19899 |   __pyx_type_5debus_11marshalling_RecursiveLogger.tp_print = 0;
            |                                                  ^
      debus/marshalling.c:19923:46: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
      19923 |   __pyx_type_5debus_11marshalling_InputBuffer.tp_print = 0;
            |                                              ^
      debus/marshalling.c:19950:47: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
      19950 |   __pyx_type_5debus_11marshalling_OutputBuffer.tp_print = 0;
            |                                               ^
      debus/marshalling.c: In function ‘__Pyx_ParseOptionalKeywords’:
      debus/marshalling.c:21057:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21057 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21057:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      21057 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21057:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21057 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21057:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21057 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21057:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      21057 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21057:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21057 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21073:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21073 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21073:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      21073 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21073:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21073 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21073:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21073 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21073:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      21073 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21073:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21073 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for debus
  Running setup.py clean for debus
Failed to build debus
Installing collected packages: debus
  Running setup.py install for debus ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for debus did not run successfully.
  │ exit code: 1
  ╰─> [156 lines of output]
      running install
      /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.10
      creating build/lib.linux-x86_64-3.10/debus
      copying debus/__init__.py -> build/lib.linux-x86_64-3.10/debus
      copying debus/connection.py -> build/lib.linux-x86_64-3.10/debus
      copying debus/message.py -> build/lib.linux-x86_64-3.10/debus
      copying debus/objects.py -> build/lib.linux-x86_64-3.10/debus
      copying debus/buses.py -> build/lib.linux-x86_64-3.10/debus
      copying debus/wire.py -> build/lib.linux-x86_64-3.10/debus
      copying debus/subscription.py -> build/lib.linux-x86_64-3.10/debus
      copying debus/types.py -> build/lib.linux-x86_64-3.10/debus
      creating build/lib.linux-x86_64-3.10/debus/freedesktop
      copying debus/freedesktop/__init__.py -> build/lib.linux-x86_64-3.10/debus/freedesktop
      copying debus/freedesktop/introspect.py -> build/lib.linux-x86_64-3.10/debus/freedesktop
      running build_ext
      building 'debus.marshalling' extension
      creating build/temp.linux-x86_64-3.10
      creating build/temp.linux-x86_64-3.10/debus
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.10 -c debus/marshalling.c -o build/temp.linux-x86_64-3.10/debus/marshalling.o
      debus/marshalling.c: In function ‘__pyx_f_5debus_11marshalling_11InputBuffer_pop_primitive’:
      debus/marshalling.c:5911:76: warning: array subscript has type ‘char’ [-Wchar-subscripts]
       5911 |           __pyx_v_primitive_size = (__pyx_v_5debus_11marshalling_alignments[__pyx_v_signature]);
            |                                                                            ^
      debus/marshalling.c: In function ‘__pyx_f_5debus_11marshalling_12OutputBuffer_put_single’:
      debus/marshalling.c:13823:74: warning: array subscript has type ‘char’ [-Wchar-subscripts]
      13823 |                 __pyx_v_t_size = (__pyx_v_5debus_11marshalling_alignments[__pyx_v_dtype]);
            |                                                                          ^
      debus/marshalling.c: In function ‘__pyx_f_5debus_11marshalling_get_alignment’:
      debus/marshalling.c:16618:55: warning: array subscript has type ‘char’ [-Wchar-subscripts]
      16618 |     __pyx_r = (__pyx_v_5debus_11marshalling_alignments[__pyx_v_t]);
            |                                                       ^
      debus/marshalling.c: In function ‘__Pyx_modinit_type_init_code’:
      debus/marshalling.c:19899:50: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
      19899 |   __pyx_type_5debus_11marshalling_RecursiveLogger.tp_print = 0;
            |                                                  ^
      debus/marshalling.c:19923:46: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
      19923 |   __pyx_type_5debus_11marshalling_InputBuffer.tp_print = 0;
            |                                              ^
      debus/marshalling.c:19950:47: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’
      19950 |   __pyx_type_5debus_11marshalling_OutputBuffer.tp_print = 0;
            |                                               ^
      debus/marshalling.c: In function ‘__Pyx_ParseOptionalKeywords’:
      debus/marshalling.c:21057:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21057 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21057:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      21057 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21057:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21057 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21057:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21057 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21057:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      21057 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21057:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21057 |                     (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                     ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21073:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21073 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21073:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      21073 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21073:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21073 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21073:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21073 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21073:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations]
      21073 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:580:45: note: declared here
        580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
            |                                             ^~~~~~~~~~~~~~~~~~~
      debus/marshalling.c:21073:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
      21073 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
            |                         ^
      In file included from /usr/include/python3.10/unicodeobject.h:1046,
                       from /usr/include/python3.10/Python.h:83,
                       from debus/marshalling.c:16:
      /usr/include/python3.10/cpython/unicodeobject.h:446:26: note: declared here
        446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
            |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> debus

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Last edited by dwlamb; 08-02-2025 at 12:58 AM. Reason: Clarity
 
Old 08-02-2025, 03:13 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 26,460

Rep: Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608
debus is an abandoned python module, you don't need that.
https://github.com/Equidamoid/debus
you [may] need dbus-python
https://pypi.org/project/dbus-python/
 
Old 08-02-2025, 01:49 PM   #5
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,818
Blog Entries: 7

Rep: Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189
Quote:
sudo pip install <module>
Never do that. Pip as root. Mixing installing python modules with your package manager and pip into your python tree. Good way to break your python tree. If you must use pip, install somewhere that user has access to. Use a python virtual machine if you need to.

Or use just pip alone for python, all of it. One package manager for all of python.

Everything python has to match. And python versions have no backwards compatibility, maybe.
 
Old 08-02-2025, 02:04 PM   #6
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,818
Blog Entries: 7

Rep: Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189Reputation: 2189
Does your python tree still work?

For example this small script using socket.
Code:
#!/usr/bin/python

#Get request header like netcat. Start script,
#Point browser or script to http://127.0.0.1:8100

import socket

def pyCat():
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
    s.bind(('127.0.0.1', 8100))
    s.listen(1)
    conn, address = s.accept()

    datachunk = str(conn.recv(1024))
    for i in datachunk.split('\\r\\n'):
        print(i)
        
    conn.close()

pyCat()
 
Old 08-02-2025, 02:26 PM   #7
dwlamb
LQ Newbie
 
Registered: Apr 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
I need to install dbus-python.

Working through the various steps of Installing Packages when I reached 'Ensure you can run pip from the command line' I hit a snag and don't know how to proceed. This is the syntax and abridged output.

Code:
$ python3 -m ensurepip --default-pip                                                     
error: externally-managed-environment                                                     
                                                                                          
× This environment is externally managed                                                  
╰─> To install Python packages system-wide, try brew install                              
    xyz, where xyz is the package you are trying to                                       
    install.                                                                              
                                                                                          
    If you wish to install a Python library that isn't in Homebrew,                       
    use a virtual environment:                                                            
                                                                                          
    python3 -m venv path/to/venv                                                          
    source path/to/venv/bin/activate                                                      
    python3 -m pip install xyz                                                            
                                                                                          
    If you wish to install a Python application that isn't in Homebrew,                   
    it may be easiest to use 'pipx install xyz', which will manage a                      
    virtual environment for you. You can install pipx with                                
                                                                                          
    brew install pipx                                                                     
                                                                                          
    You may restore the old behavior of pip by passing                                    
    the '--break-system-packages' flag to pip, or by adding                               
    'break-system-packages = true' to your pip.conf file. The latter                      
    will permanently disable this error.                                                  
                                                                                          
    If you disable this error, we STRONGLY recommend that you additionally                
    pass the '--user' flag to pip, or set 'user = true' in your pip.conf                  
    file. Failure to do this can result in a broken Homebrew installation.                
    
    Read more about this behavior here: <https://peps.python.org/pep-0668/>
As far as I know, my python installation is not by `brew`. So I need to go the virtual environment route. But I am installing dbus-python to use in apps like backintime, atuin - installed in brew, and any other python based software. I can't get my head around how to apply:
Code:
    python3 -m venv path/to/venv                                                          
    source path/to/venv/bin/activate                                                      
    python3 -m pip install xyz
 
Old 08-02-2025, 02:29 PM   #8
dwlamb
LQ Newbie
 
Registered: Apr 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by teckk View Post
Does your python tree still work?

For example this small script using socket.
Code:
#!/usr/bin/python

#Get request header like netcat. Start script,
#Point browser or script to http://127.0.0.1:8100
I don't understand ^^^^
 
Old 08-02-2025, 03:10 PM   #9
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi, Debian, antiX, Ubuntu
Posts: 2,326

Rep: Reputation: 829Reputation: 829Reputation: 829Reputation: 829Reputation: 829Reputation: 829Reputation: 829
Quote:
Originally Posted by dwlamb View Post
I used `sudo` for `pip install debus` yielded errors indicating normal site-packages is not writeable
Just want to clarify this you, that is not an error. Error messages usually say "error". Without sudo, it should not be able to write to system, so installs as user, which is what you want. That means it'll only work for you because it's putting it under your $HOME folder, but that also means it won't break the OS as it's not able to overwrite any system files - which should only be managed by your distros package manager, not third party installers like pip. Using sudo blindly is a method for breaking your OS, only use it when you absolutely need to write stuff outside your home.
 
Old 05-19-2026, 08:34 AM   #10
buhtz
LQ Newbie
 
Registered: Jul 2024
Distribution: GNU/Linux Debian
Posts: 12

Rep: Reputation: Disabled
Wink

Hello,

upstream maintainer of Back In Time here.

The thread is quit old. Could you find a solution to your problem? If not please let me know the GNU/Linux distribution and its version you are using. Also state where you installed Back In Time from; I hope from the official package repository of your GNU/Linux distribution.

Let me know if I can be of assistance.

Regards,
Christian
 
  


Reply

Tags
python



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Major Release of Homebrew after 3.6: What Are the New Changes? LXer Syndicated Linux News 0 02-20-2023 04:33 AM
LXer: Using Homebrew Package Manager on Fedora Linux LXer Syndicated Linux News 0 03-09-2022 08:45 PM
LXer: Installing and Using Homebrew Package Manager on Linux LXer Syndicated Linux News 0 12-01-2021 01:51 PM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM
Nintendo Wii , installing the Homebrew Channel jens General 18 08-20-2008 03:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:05 PM.

Contact Us - Advertising Info - Rules - Privacy - Donations - Contributing Member - LQ Sitemap - "Weather apps tell you it'll rain. Wyndo tells you when to go."
Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions