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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-01-2025, 09:36 PM
|
#1
|
|
LQ Newbie
Registered: Apr 2012
Posts: 15
Rep: 
|
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.
|
|
|
|
08-01-2025, 11:51 PM
|
#2
|
|
Senior Member
Registered: Jul 2020
Posts: 1,880
|
It's not debus-python
|
|
|
|
08-02-2025, 12:55 AM
|
#3
|
|
LQ Newbie
Registered: Apr 2012
Posts: 15
Original Poster
Rep: 
|
@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
|
|
|
|
08-02-2025, 01:49 PM
|
#5
|
|
LQ Guru
Registered: Oct 2004
Distribution: Arch
Posts: 5,818
|
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.
|
|
|
|
08-02-2025, 02:04 PM
|
#6
|
|
LQ Guru
Registered: Oct 2004
Distribution: Arch
Posts: 5,818
|
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()
|
|
|
|
08-02-2025, 02:26 PM
|
#7
|
|
LQ Newbie
Registered: Apr 2012
Posts: 15
Original Poster
Rep: 
|
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
|
|
|
|
08-02-2025, 02:29 PM
|
#8
|
|
LQ Newbie
Registered: Apr 2012
Posts: 15
Original Poster
Rep: 
|
Quote:
Originally Posted by teckk
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 ^^^^
|
|
|
|
08-02-2025, 03:10 PM
|
#9
|
|
Senior Member
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi, Debian, antiX, Ubuntu
Posts: 2,326
|
Quote:
Originally Posted by dwlamb
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.
|
|
|
|
05-19-2026, 08:34 AM
|
#10
|
|
LQ Newbie
Registered: Jul 2024
Distribution: GNU/Linux Debian
Posts: 12
Rep: 
|
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
|
|
|
|
All times are GMT -5. The time now is 06:05 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|