Open bscipio opened 7 years ago
You really should not add conda to your PATH like this. Use the activate script when you want to use conda, or else add it to your non login shells only.
Thank you for the reply. If this should not be done, why does the anaconda installation offer to the add to $PATH?
I still don't understand what changed between 4.4 and 5.0 to cause this issue to appear in 5.0. I think the root cause should at least be understood.
The root cause is incompatibility between system tools and libraries and Anaconda's tools and libraries. I would like to remove the option to add to PATH or at least issue a strong warning about it.
On Oct 6, 2017 12:23 PM, "bscipio" notifications@github.com wrote:
Thank you for the reply. If this should not be done, why does the anaconda installation offer to the add to $PATH?
I still don't understand what changed between 4.4 and 5.0 to cause this issue to appear in 5.0. I think the root cause should at least be understood.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ContinuumIO/anaconda-issues/issues/6439#issuecomment-334728414, or mute the thread https://github.com/notifications/unsubscribe-auth/AA_pdM_zui2kfS2XPpWxH5EtMZTFmbmMks5spg2ygaJpZM4Pv3wQ .
Thanks for the non-login shell tip. I think I found a workaround:
I moved setting the anaconda path from .bash_profile to .bashrc, even though I thought setting $PATH in .bashrc is atypical (vs. in .bash_proflle/.profile).
Also needed to add a key previous line of [ -z "$PS1" ] && return
I added the logic when setting $PATH to avoid duplicate anaconda path entries - since I'm now appending to $PATH in .bashrc vs. .profile/.bash_profile. Thanks to this post.
I haven't run into unintended consequences yet.
.bashrc
# If not running interactively, don't do anything
# This is required, otherwise error at KDE login
# "Could not start D-bus. Can you call qdbus-qt5?"
[ -z "$PS1" ] && return
[[ ":$PATH:" =~ ":/home/user/anaconda2/bin:" ]] || PATH="/home/user/anaconda/bin:$PATH"
I would still say the specific root cause is not identified. (I do understand it "something" w/anaconda libs vs. system libs -- but which lib (qt) and why all of the sudden with this 4.4 to 5.0 version change)
Maybe some updates to the anaconda install instructions are needed with a preferred minimalist .bashrc/.profile/.bash_profile setup example.
Ref:
The specific root cause is that SUSE libraries and tools are not compatible with our libraries and tools.
This is not unusual in the least.
Your point is well understood is general, but we are missing the specific bins/libs.
As experienced here, Anaconda 4.4 was compatible and 5.0 is not.
So it could be useful to pin point the exact package(s) and versions that are the root cause. (I suspect qt ones given the previous #1206 ). Then a possible alternative to the .bashrc mod above (or being stuck at 4.4) could be to:
I'm NOT suggesting this is a great alternative - just that it could be a path someone could pursue
I'll reiterate that updates to the anaconda install instructions that include a recommended minimalist .bashrc/.profile/.bash_profile example setup would be quite useful to Linux desktop users. Updates like that should help prevent Anaconda users running into these sorts of issues.
Perhaps I should submit that request as another issue?
Thanks.
When I investigated this last, OpenSUSE/KDE were running a system tool (qtpaths
) without specifying the full path to it. This means they are not taking care to ensure that the exact program they need gets run, and when it doesn't, bad things happen.
The old issue is at: https://github.com/ContinuumIO/anaconda-issues/issues/1206
In my first post above, note that the
Issue occurs despite a manual edit to /usr/bin/startkde script to explicitly point to /usr/bin/qtpaths & /usr/bin/qdbus-qt5. This edit was is mentioned in previous reported issue #1206 and in OpenSUSE forum posts below. It doesn't appear the absolute path update is in OpenSUSE 42.3)
So the explicit path fixes to startkde mentioned in previous #1206 did not work for me. I had to modify my .bashrc as noted above. (and not set anaconda path in .profile or .bash_profile)
Just to mention this here - the discussion continues in opensuse: https://bugzilla.opensuse.org/show_bug.cgi?id=1004769
I think the root cause of these issues is that .bashrc should not be read at all when starting a graphical desktop, but .profile should be used in this case:
Thanks for the update @Knusper. Hopefully SUSE will agree and fix this on their side.
OK - in openSUSE they would have to make some changes for some init scripts where the relevant parts have been unchanged for 17 years - (basically ~/.bashrc is sourced in a login-shell from /etc/profile, which is not standard). It might happen, depending on the responses I get from the community mailinglist.
https://bugzilla.opensuse.org/show_bug.cgi?id=1078124
Are other distros known to be affected by this? Otherwise, I think its better to change the title of this post? My feeling is, that this is a openSUSE'ism ...
I have not see this anywhere else.
I just had this problem with KDE on centos. With anaocnda adding it self to .bashr i couldn't start vncserver with kde, commenting out anaconda from .bashrc helped with vnc
@dryguz can you try adding [ -z "$PS1" ] && return
before the anaconda line?
Yes, I saw @bscipio comment above and added
[ -z "$PS1" ] && return
[[ ":$PATH:" =~ ":/home/user/anaconda3/bin:" ]] || PATH="/home/user/anaconda3/bin:$PATH"
to the .bashrc don't know what exactly they do, but kde in vnc and anaconda is working with them, so great :)
[ -z "$PS1" ] && return
- checks whether the prompt variable PS1 is set, which is usually only the case in interactive non-login shells. There are several ways to do this, see https://unix.stackexchange.com/questions/26676/how-to-check-if-a-shell-is-login-interactive-batch/ - but I prefer this method. I don't know if it is bullet-proof, though. Anyhow, this is not a support forum - but in order to close this bug, I would suggest that the anaconda installer adds something like this instead of the current default line to the .bashrc.
I tried using this in my .bashrc as recommended above
[ -z "$PS1" ] && return
[[ ":$PATH:" =~ ":/home/user/anaconda3/bin:" ]] || PATH="/home/user/anaconda3/bin:$PATH"
I can now login to the desktop fine, but if I start a TurboVNC session and try to connect to it, I still get the same "Could not start D-Bus. Can you call qdbus?" error. Any ideas on what I need to change to get VNC working too?
Hello, Issue #1206 is occurring again after an Anaconda 4.4 to 5.0.0.1 update.
This update breaks KDE if anaconda is added to $PATH I previously was using Anaconda 4.4 in my $PATH without issues.
Issue occurs despite a manual edit to /usr/bin/startkde script to explicitly point to /usr/bin/qtpaths & /usr/bin/qdbus-qt5. This edit was is mentioned in previous reported issue #1206 and in OpenSUSE forum posts below. (It doesn't appear the absolute path update is in OpenSUSE 42.3)
Also tested a completely fresh download & install on anaconda 5.0 and 4.4 and can confirm same behavior. (5.0 can't login, 4.4 ok)
My System
OpenSUSE forums:
conda info
Let me know what else is needed. Thank you!