[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [BUG] conda doesn't work in ob-shell sessions
From: |
Ihor Radchenko |
Subject: |
Re: [BUG] conda doesn't work in ob-shell sessions |
Date: |
Thu, 18 Jan 2024 11:55:03 +0000 |
Jack Kamm <jackkamm@tatersworld.org> writes:
>> 1. M-x shell
>
> When I follow your example, in particular starting the session with
> M-x shell, then conda works as expected, and behavior is same as you
> report.
>
> But when I don't start with M-x shell, instead letting ob-shell create
> the session, then conda gives the error about needing to run conda init
> (despite the fact that conda init had already set up my zshrc).
>
> #+begin_src sh :session *myshell* :results output
> conda activate ledger
> #+end_src
> #+RESULTS:
> #+begin_example
> CommandNotFoundError: Your shell has not been properly configured to use
> 'conda activate'.
> To initialize your shell, run
>
> $ conda init <SHELL_NAME>
I believe that is it because you explicitly specified "sh" shell, not
zsh.
When you use M-x shell, Emacs will pick up the system shell. In
contrast, ob-shell will let-bind `shell-file-name' to the shell name you
specify in the src block. The only exception is #+begin_src shell, which
will use the default system shell.
So, I believe that the following should work for you
#+begin_src shell :session *myshell* :results output
conda activate ledger
#+end_src
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Re: [BUG] conda doesn't work in ob-shell sessions,
Ihor Radchenko <=
- Re: [BUG] conda doesn't work in ob-shell sessions, Jack Kamm, 2024/01/21
- Re: [BUG] conda doesn't work in ob-shell sessions, Jack Kamm, 2024/01/21
- Re: [BUG] conda doesn't work in ob-shell sessions, Ihor Radchenko, 2024/01/22
- Re: [BUG] conda doesn't work in ob-shell sessions, Jack Kamm, 2024/01/23
- Re: [BUG] conda doesn't work in ob-shell sessions, Ihor Radchenko, 2024/01/24
- Re: [BUG] conda doesn't work in ob-shell sessions, Matt, 2024/01/25
- Re: [BUG] conda doesn't work in ob-shell sessions, Ihor Radchenko, 2024/01/25
- Re: [BUG] conda doesn't work in ob-shell sessions, Jack Kamm, 2024/01/25
- Re: [BUG] conda doesn't work in ob-shell sessions, Matt, 2024/01/27
Re: [BUG] conda doesn't work in ob-shell sessions, Suhail Singh, 2024/01/23