Good Morning to EVerybody,
I am using OpenSuse Leap for work but I am not a “linux-expert”.
I needed to install anaconda since I needed to write something in python.
I followed all the required steps as written in the Anaconda website, I installed it and it is working.
Sorry for the parenthesis but I don’t know if it is a coincidence or is the cause of my problem.
However after a rebooting of the system if I choose to login with Plasma 5 or KDE Plasma workspace it shows the background and a dialog window with written:
Could not start D-bus. Can you call qdbus-qt5?
If I press ok the button comes black and nothing else happen. How can I solve this problem?
Many thanks in advance for the help.
Can you please post a link to those “required steps as written in the Anaconda website”?
Knowing what you did exactly may make finding the problem easier.
However after a rebooting of the system if I choose to login with Plasma 5 or KDE Plasma workspace it shows the background and a dialog window with written:
Could not start D-bus. Can you call qdbus-qt5?
And can you?
Login to IceWM e.g., start an xterm or konsole, and type “qdbus-qt5”, then post the output.
Right, so startkde tries to run /home/cordelli/anaconda3/bin/qdbus-qt5, which doesn’t exist.
You could copy qdbus-qt5 from /usr/lib64/qt5/bin/ to /home/cordelli/anaconda3/bin/ as a workaround.
But it’s probably better to fix the damage that the anaconda installer has done.
PS: According to the Qt documentation, the binaries dir is hardcoded into the Qt library at compile time.
So changing the path should not break startkde in this regard.
Maybe anaconda comes with its own version of qtpaths or Qt that uses ~/anaconda3/bin?
What does “which qtdbus-qt5” say? (with that line in ~/.bashrc)
I put again the line in the .bashrc and this are the output in the console:
cordelli@drago:~> which qtdbus-qt5
which: no qtdbus-qt5 in (/home/cordelli/anaconda3/bin:/home/cordelli/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games)
Just to be more precise these are the output that I get if I don’t put the line in the .bashrc:
cordelli@drago:~> ./anaconda3/bin/anaconda-navigator
Traceback (most recent call last):
File “./anaconda3/bin/anaconda-navigator”, line 6, in <module>
sys.exit(anaconda_navigator.app.main.main())
File “/home/cordelli/anaconda3/lib/python3.5/site-packages/anaconda_navigator/app/main.py”, line 70, in main
window = run_app(splash)
File “/home/cordelli/anaconda3/lib/python3.5/site-packages/anaconda_navigator/app/main.py”, line 38, in run_app
window = MainWindow(splash=splash)
File “/home/cordelli/anaconda3/lib/python3.5/site-packages/anaconda_navigator/widgets/main_window.py”, line 145, in init
self.api = AnacondaAPI()
File “/home/cordelli/anaconda3/lib/python3.5/site-packages/anaconda_navigator/api/anaconda_api.py”, line 434, in AnacondaAPI
ANACONDA_API = _AnacondaAPI()
File “/home/cordelli/anaconda3/lib/python3.5/site-packages/anaconda_navigator/api/anaconda_api.py”, line 39, in init
self._conda_api = CondaAPI()
File “/home/cordelli/anaconda3/lib/python3.5/site-packages/anaconda_navigator/api/conda_api.py”, line 1185, in CondaAPI
CONDA_API = _CondaAPI()
File “/home/cordelli/anaconda3/lib/python3.5/site-packages/anaconda_navigator/api/conda_api.py”, line 267, in init
self.set_root_prefix()
File “/home/cordelli/anaconda3/lib/python3.5/site-packages/anaconda_navigator/api/conda_api.py”, line 374, in set_root_prefix
self.ROOT_PREFIX = info’root_prefix’]
TypeError: byte indices must be integers or slices, not str
Sorry, that was a typo, it’s “which qdbus-qt5” of course.
Just to be more precise these are the output that I get if I don’t put the line in the .bashrc:
Well, I suspected that Anaconda will not work without that.
But the main question is, does Plasma work again?
If yes, you shouldn’t put this into ~/.bashrc, but rather run it only when starting Anaconda (in a start script e.g.), as it breaks the system Qt5 installation.
Yes, the plasma works again since yesterday many thanks for the help.
As temporary solution yes I put/leave the line in the .bashrc depending on the needs, at this point there is not a simple way to overcome this problem right?
There is, as I wrote: don’t add /home/cordelli/anaconda3/bin to the path in ~/.bashrc, but do so only when actually starting anaconda.
The easiest way would be to create a script that does export PATH=“/home/cordelli/anaconda3/bin:$PATH” and then runs anaconda, and start anaconda using this script.
Though as ./anaconda3/bin/anaconda-navigator just seems to be a python script, it could probably be modified accordingly to add /home/cordelli/anaconda3/bin to the path as first thing.
I suspect that anaconda comes with its own version of Qt (qtpaths in particular).
To verify this, please post the output of “which qdbus-qt5” with this line in ~/.bashrc, and/or show the content of /home/cordelli/anaconda3/bin.
Ok I understand, don’t worry it is not such necessary but at least in case I would do it I have an idea on how to…
For the rest again many many thanks for your help, with the Plasma working again everything is more comfortable.
I can confirm that I had the same problem after installing Anaconda, so let me follow up with what you asked with the Anaconda directory still in PATH:
$ which qdbus-qt5
/usr/bin/qdbus-qt5
So it looks like it still points to the correct path with or without including Anaconda in PATH, *although *removing the line in ~/.bashrc created by Anaconda fixes the problem.
Let me list what all is under ~/anaconda3/bin next:
Well, the main problem is that it comes with its own version of qtpaths that “replaces” the system’s one (if ~/anaconda3/bin/ is in the path before /usr/bin/) and points to the Qt (tools) in ~/anaconda3), but it doesn’t come with qdbus-qt5 that startkde expects.
Some background: we (openSUSE) rename /usr/bin/qdbus to qdbus-qt5 to make it co-installable with Qt4 (which has qdbus as well).
Therefore we also patch startkde to run qdbus-qt5 instead of qdbus.
But even if that wasn’t the case, you might run into problems sooner or later, as different versions of Qt are not necessarily 100% compatible…
As I wrote, I would recommend to remove that PATH line from ~/.bashrc, and create a start script for anaconda that sets it and runs anaconda afterwards.
Put the script into ~/bin/ e.g. and it will be in the path.
I also ran into the same problem and debugged it. Se here is what happens:
A user perpends a path to the PATH environment variable that contains an own version of qtpaths. (In this specific case the qtpaths comes from the Anaconda Python distribution, i.e. ~/anaconda/bin, but the problem is not specific to Anaconda.)
The startkde script invokes qtpaths --binaries-dir, which will pick the first available qtpaths. (In this specific case ~/anaconda/bin/qtpaths).
The path to qdbus-qt5 is set from the qtpaths result, and hence running [FONT=courier new]qdbus-qt5[/FONT] will fail since [FONT=courier new]qdbus-qt5[/FONT] is only available from openSUSE system packages.
I debugged this in an IceWM session running startkde manually. To fix this consistently, we need to make sure that startkde always invokes the system qtpaths. Here a patch that ensures this and makes the whole thing (Anaconda + KDE) work as expected:
--- /usr/bin/startkde.bak 2016-03-03 22:13:35.000000000 +0200
+++ /usr/bin/startkde 2016-11-02 10:18:54.137254008 +0200
@@ -20,7 +20,7 @@
# in case we have been started with full pathname spec without being in PATH
bindir=`echo "$0" | sed -n 's,^\(/.*\)/^/]^/]*$,\1,p'`
if -n "$bindir" ]; then
- qbindir=`qtpaths --binaries-dir`
+ qbindir=`/usr/bin/qtpaths --binaries-dir`
qdbus=$qbindir/qdbus-qt5
case $PATH in
$bindir|$bindir:*|*:$bindir|*:$bindir:*) ;;
@@ -210,7 +210,7 @@
# better use the Autostart folder.
# TODO: Use GenericConfigLocation once we depend on Qt 5.4
-scriptpath=`qtpaths --paths ConfigLocation | tr ':' '
' | sed 's,$,/plasma-workspace,g'`
+scriptpath=`/usr/bin/qtpaths --paths ConfigLocation | tr ':' '
' | sed 's,$,/plasma-workspace,g'`
# Add /env/ to the directory to locate the scripts to be sourced
for prefix in `echo $scriptpath`; do
Here the values of relevant variables in startkde (lines 20-30), with and without the patch: