gregsexton / gregsexton/ob-ipython
ob-ipython fails when Emacs python REPL different from Jupyter python
- Dominant language
- Emacs Lisp
- Stars
- 742
- Forks
- 107
- PR merge metrics
- No merged PRs in 30d
Description
The new experimental `jupyter-X` kernel feature is working GREAT!

However, I had to go in and customize `python-shell-interpreter` to `python3` to work. That's because (in my case) the Spacemacs python layer configures the REPL to `ipython`. In that case, `python-shell-interpreter` returns `ipython`,
```
(defun ob-ipython--get-python ()
(locate-file (if (eq system-type 'windows-nt)
"python.exe"
(or python-shell-interpreter "python"))
exec-path))
```
which fails to accept accept the passed arguments and fails to find `jupyter_client` to import.
Also, (in my case), `python` is 2.7. However, Jupyter is installed as Python 3, so `jupyter_client` failed to import in `client.py`.
While `pyenv` is supposed to deal with these issues, I would imagine it's always going to be possible/likely that someone's emacs config might have a different version of python than their Jupyter install. Maybe always running `client.py` from an ipython console process vs python process, on the assumption that jupyter should always be able to find jupyter components and already be in the right python environment?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.