The anaconda issue again (Could not start d-bus, can you call qdbus-qt5)

Hello Forum,

I am experiencing an identical issue to one posted here previously; after installing Anaconda, the error dialog box “Could not start d-bus, can you call qdbus-qt5” is seen at login.

https://forums.opensuse.org/showthread.php/520970-Could-not-start-d-bus-can-you-call-qdbus-qt5

After looking through many threads, I see there is a simple but inconvenient fix which is to edit ~/.bashrc and comment out the line below

# export PATH="/home/nick/anaconda3/bin:$PATH

This does work and when the line is commented out, KDE starts correctly.
However, I would really like to be able to keep the line in .bashrc as I otherwise need to state the full path to every function I call from ~/anaconda3/bin

I have read through the information in the above thread and have attempted the solutions recommended by wolfi323 in post #4

Of the three options suggested by wolfi323, I have already confirmed that option 1 works but is a little inconvenient.
The other two options were

  • copy or symlink qdbus-qt5 in /home/username/anaconda3/bin
  • modify /usr/bin/startkde and add the explicit path to the call to qtpaths, i.e. replace qtpaths with /usr/bin/qtpaths

I have attempted the symlink option without any success, but this could be a mistake on my part as I still very much a novice!

This is how I attempted it.

I have an up to date installation of OpenSuse Leap 42.3

**When “PATH =” line is commented out of ~/.bashrc

**

> qtpaths --binaries-dir
/usr/lib64/qt5/bin

> which qtpaths
/usr/bin/qtpaths

When “PATH =” line is NOT commented out of ~/.bashrc

>qtpaths --binaries-dir
/home/nick/anconda3/bin

>which qtpaths
/home/nick/anaconda3/bin/qtpaths

If I understand correctly, I need to backup and remove the copy of qtpaths from /home/nick/anaconda3/bin and place a symlink to either /usr/lib64/qt5/bin/qtpaths or /usr/bin/qtpaths.

This is what I tried.

mv ~/anaconda3/bin/qtpaths ~/qtpaths.bak
ln -s /usr/lib64/qt5/bin/qtpaths ~/anaconda3/bin/qtpaths

Did not work so I then tried

rm ~/anaconda3/bin/qtpaths
ln -s /usr/bin/qtpaths ~/anaconda3/bin/qtpaths

Am I doing this correctly. If not,please could someone explain where I am going wrong.

Many thanks,

Nick

I have not read all of your post and thus I may be completely wrong, but did you try to put your personal directory at the end of PATH?

export PATH="$PATH:/home/nick/anaconda3/bin"

(And what you posted can not be correct, there is a " missing there >:( )

Hello Henk,

Thank you for your reply. You are correct, the path in my original post was incomplete.

The full path should have read

export PATH="/home/nick/anaconda3/bin:$PATH" 

I will update my original post.

Best wishes,

Nick

You can not update your original post. You will have to do with the correction you posted here.

But the important thing is if you tested my suggestion or rejected it out of hand. or did something different with it.

Hello Henk,

I would certainly not reject any suggestions out of hand. The only use of the PATH line I have tried so far is to comment it out or include it.

If it is commented out, KDE starts correctly but I need to include the full path to applications in the directory. E.g.
~/anaconda3/bin/conda

If the line is not commented out, KDE does not start correctly and I get the “Could not start d-bus, can you call qdbus-qt5” message.

Please could you explain in more detail what you suggested I should try.

Many thanks.

Nick

I suggested an alternative in my post #2 above!
Didn’t you see that?
You only answered my side remark that was put between ( ), but the post starts with what is important (that is, what I though that it might be important for you.

I will repeat it:

export PATH="$PATH:/home/nick/anaconda3/bin"

Hello Henk,

Thank you for the suggestion. First time around, I did not notice that your suggestion was not the same as what I had already tried. In your suggestion, the $PATH is at the start of the string, not at the end.

I have just tried it and I am pleased to report that it appears to work! :slight_smile:

With the line you suggested in the ~/.bashrc, KDE still starts successfully and I can access the anaconda applications directly from the terminal without prefixing the full path.

Please could you explain why this variation works as there is only one other line in .bashrc


test -s ~/.alias && . ~/.alias || true

# added by Anaconda3 installer
# export PATH="/home/nick/anaconda3/bin:$PATH"
export PATH="$PATH:/home/nick/anaconda3/bin"

Thank you again for your help!

Best wishes,

Nick

Always read and re-read and try to understand helper posts lol!.

From

man bash

PATH
The search path for commands. It is a colon-separated list of directories in which the shell looks for commands (see COMMAND EXECUTION below). A zero-length (null) directory name in the value of PATH indicates the current directory. A null directory name may appear as two adjacent colons, or as an initial or trailing colon. The default path is system-dependent, and is set by the administrator who installs bash. A common value is ``/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin’'.

As the directories are tried from left to right, there will be a difference between what the shell (and in your case, also KDE and Anaconda) will find if two or more files with the same name are found in different directories mentioned there. It will use the first one found. In my suggestion, the system directories are searched first and your addition as last. In your original, your addition is searched first. Imagine when programs with the names of common tools like ls are found there! They will be executed instead of the real ls.

So an incorrect PATH can lead to the wrong program being executed. Specially for root this can be fatal. That is why you should always use

su -

instead of plain

su

With the first root will always have it’s own PATH (which is different from what others get) instead of a crafted one from the original user that executes the su.

BTW, I wonder why the Anaconda designers think that starting with it is the better setting.

Hello Henk,

Thank you for the explanation, I now understand why your solution works. It is elegant and logical once someone has explained it to me!

I appreciate your help.

Best wishes,

Nick

You are welcome.

With Linux, every day is learning day lol!

Saw this thread and have questions…
I’ve installed base Anaconda and Miniconda, and they only have Python packages, no Qt.
That’s a pretty simple setup with little chance for problems.

I see that it’s possible to install an Anaconda Qt package
https://anaconda.org/anaconda/qt

An important concept installing Anaconda is that a PATH is installed, prepending to the Anaconda file tree, and doing so the Anaconda files have precedence over the default openSUSE system files.

When Anaconda is only Python apps, then there’s little likelihood for problems or conflicts, but when you’re talking about graphical libraries like Qt, that opens up the possibility of complex problems. I don’t know for sure, but I’d expect that if Anaconda Qt is installed using the above link, it should install Qt completely and work without issue like how the base Python works.

But, this thread suggests that maybe Anaconda Qt wasn’t installed, and now gymnastics are required that artificially link openSUSE system and Anaconda Qt libraries. Skimming docs for various Anaconda Qt apps, PyQt4 or PyQt5 are also recommended if not absolute dependencies.

So, asking the @OP,
How or what did he do to install Anaconda with Qt?
Did he just install Anaconda without the Qt package and expect Qt to work?
Did he look up the Anaconda install documentation specific to the app?

TSU

There is a tool in Linux that is ideal for setting up software so that it does not get in the way for the system by screwing up paths or whatever. This tool is called Environment Modules:
http://modules.sourceforge.net/ Essentially you make the software available by “loading” it. Before it is loaded the system is as if the software never had been installed. What happens when you load the software is that environment variables such as PATH and possibly other stuff gets tweaked so you can easily start and work with your application. By loading the software manually in a terminal window it is only child processes started in that window that are aware of the software at all. The rest of the system is only aware to the extent to which software is “loadable”. Environment Modules takes a bit of setting up but once it’s done it’s super, really. I have multiple versions of Anaconda and Matlab installed and can run several versions of each simultaneously if I want to and there is virtually no limit to what you can do in terms of environment and still have the unmodified environment available.

In Leap the software can be found in the ordinary repositories. Just do:

sudo zypper se Modules

and you will probably find it at the top of the list. Then install it with:

sudo zypper in Modules

.

The setting up process is a bit involved, I admit, but pretty soon after you have crossed that bridge you will start wondering how you ever managed without Environment Modules.