Open eduncan911 opened 4 years ago
I should also note that the error and attached error log was from me trying to remove the requirements.txt
version of dbus-python
, to see if it would make a difference.
It didn't. Exact same error, and messages, using version >= 1.2.0
in the requirements.txt
.
A possible replacement is to fix the wheel build issue reported above.
Which is:
checking for DBUS... no
configure: error: Package requirements (dbus-1 >= 1.8) were not met:
No package 'dbus-1' found
Try installing (via apt) libdbus-1-dev
. Does it help?
Installing dev packages on a secure machine is not a solution.
Though yes, I admit that may help.
At this point, I'm building a Docker image to debug this safely.
I don't know what a secure machine means, but I'd say installing dev packages maintained by your distro maintainers is a magnitude safer than installing random packages from PyPI.
At first glance, you would think. However, the attack vector is insignificant compared to system-wide packages.
Python wheels are isolated to the user space it runs under (if not installed with sudo) - in this case, a limited user with no sudo rights. And, only accessible under the virtualenv it is being run under (other tooling and scripts run by the user won't have access to those wheels - unless they do a user/system scan for packages in virtualenvs and I've never seen such a thing in the 100s and 100s of CVEs I've mitigated in Python and Ruby).
Whereas dev packages are available system wide for exploits by any script, anywhere, including browsers and all user spaces - even no login users.
We should be looking into removing that wheel and using another as a resolution at this point.
On Mon, Aug 3, 2020, 7:59 AM Miro Hrončok notifications@github.com wrote:
I don't know what a secure machine means, but I'd say installing dev packages maintained by your distro maintainers is a magnitude safer than installing random packages from PyPI.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kliment/Printrun/issues/1089#issuecomment-667982841, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAZUFAHGUD2LB2LZ2I3EXTR62RBZANCNFSM4PS2YBFQ .
pydbus
is the preferred lib to use in place of the deprecated dbus-python
.
And, it does not require any system-wide dev packages installed. :)
@eduncan911 You can try something like this:
apt download libdbus-1-dev
dpkg -x libdbus-1*.deb dbus-deb
# show values for DBUS_CFLAGS DBUS_LIBS
PKG_CONFIG_PATH=dbus-deb/usr/lib/x86_64-linux-gnu/pkgconfig pkg-config --cflags --libs dbus-1
-I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -ldbus-1
export DBUS_CFLAGS=-I dbus-deb/... -I ...
export DBUS_LIBS=-ldbus-deb/usr/lib/x86_64-linux-gnu/libdbus-1.so
pip install -r requirements.txt
Another workaround is to download python3-dbus and set PYTHONPATH These paths are taken from Ubuntu 19, may be different in your env
Another workaround is to comment/delete the dbus line from requirements.txt. The code catches import exceptions, kind of graceful degrade. You have to manually ensure that the machine does not fall asleep.
I got similar errors to what was posted above, at the "install -r requirements" step. Afterward I did apt-get update and upgrade. I retried the previous step and received the following error message:
"wxPython-4.1.0-cp27-cp27mu-linux_x86_64.whl is not a supported wheel on this platform"
my computer is running Debian 10
@Duke-Cardlert , you should use python3: pip install -r requirements.txt should be pip3 install -r requirements.txt
thank you for the reply. I was able to find success by skipping this "wxPython wheel" step as shown in the installation guide. If I find that I need to reinstall, I will do it this way.
all the best!
On Sat, Nov 7, 2020 at 8:34 AM volconst notifications@github.com wrote:
@Duke-Cardlert https://github.com/Duke-Cardlert , you should use python3: pip install -r requirements.txt should be pip3 install -r requirements.txt
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kliment/Printrun/issues/1089#issuecomment-723466363, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALGO32JV6PE7QC76UF3FDATSOVZKJANCNFSM4PS2YBFQ .
EDIT: It seems to be specifying
dbus-python
, which is deprecated and it's oldsetup.py
method won't be supported in the [very] near future.It has been replaced by
pydbus
, which should be used in its stead.Using
master
branch at the time of writing this issue.Then when trying to install the deps (snipped most of the successful ones):
Attached is the entire output.
pip-install-error.txt
This would be a lot easier if there was an AppImage or Dockerfile. ;)