elpy icon indicating copy to clipboard operation
elpy copied to clipboard

jupyter won't load: jupyter-console not found

Open dstrozzi opened this issue 4 months ago • 0 comments

Summary

I just did a fresh "install" of elpy. I can't get jupyter to start as the interactive shell.

Steps to reproduce

Use my init.el below. Open a .py file Menu: Python -> Start interpreter

Python buffer then contains:

usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir]
               [--paths] [--json] [--debug]
               [subcommand]

Jupyter: Interactive Computing

positional arguments:
  subcommand     the subcommand to launch

optional arguments:
  -h, --help     show this help message and exit
  --version      show the versions of core jupyter packages and exit
  --config-dir   show Jupyter config dir
  --data-dir     show Jupyter data dir
  --runtime-dir  show Jupyter runtime dir
  --paths        show all Jupyter paths. Add --json for machine-readable
                 format.
  --json         output paths as machine-readable json
  --debug        output debug information about paths

Available subcommands: dejavu execute kernel kernelspec migrate nbconvert run
server troubleshoot trust

Jupyter command `jupyter-console` not found.

Process Python exited abnormally with code 1

My configuration

emacs 26.1 on RedHat Enterprise Linux 8 (corporate system)

Result of (elpy-config)

Elpy Configuration

Emacs.............: 26.1
Elpy..............: 1.35.0
Virtualenv........: None
Interactive Python: jupyter ... (/usr/WS1/idesign/idesign-v2.1.0-prod/arch/toss_4_x86_64_ib/3.9.12/bin/jupyter)
RPC virtualenv....: rpc-venv (/g/g13/strozzi2/.emacs.d/elpy/rpc-venv)
 Python...........: python 3.9.12 (/g/g13/strozzi2/.emacs.d/elpy/rpc-venv/bin/python)
 Jedi.............: 0.19.1
 Autopep8.........: 2.3.1
 Yapf.............: 0.40.2
 Black............: 24.10.0
Syntax checker....: Not found (flake8)

Warnings

You have not activated a virtual env. It is not mandatory but often a
good idea to work inside a virtual env. You can use `M-x
pyvenv-activate` or `M-x pyvenv-workon` to activate one.

The directory ~/.local/bin/ is not in your PATH. As there is no active
virtualenv, installing Python packages locally will place executables
in that directory, so Emacs won't find them. If you are missing some
commands, do add this directory to your PATH -- and then do
`elpy-rpc-restart'.

The configured syntax checker (flake8) could not be found. Elpy uses
this program to provide syntax checks of your code. You can either
install it, or select another one using `elpy-syntax-check-command`.

[Install flake8]

Elpy configuration in my init.el

(use-package elpy
  :ensure t
  :init
  (elpy-enable))

(setq python-shell-interpreter "jupyter"
      python-shell-interpreter-args "console --simple-prompt"
      python-shell-prompt-detect-failure-warning nil)
(add-to-list 'python-shell-completion-native-disabled-interpreters
             "jupyter")

dstrozzi avatar Oct 20 '24 22:10 dstrozzi