最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ZMQ module not found on jupyter emacs - Stack Overflow

programmeradmin1浏览0评论

I have installed Jupyter kernel. can someone tell us how to solve "ZMQ module not found" issue on Emacs when I run Jupyter-run-repl?

I have already set all these paths and there is no issues from this part. I have also installed ZMQ through conda environment and is working properly through terminal. I cannot understand why i still this error.

(setq python-shell-interpreter "/opt/homebrew/Caskroom/miniconda/base/envs/emacs-py/bin/python")
(setq python-shell-interpreter-args "")

(setq jupyter-runtime-directory "/opt/homebrew/Caskroom/miniconda/base/envs/emacs-py/share/jupyter/runtime/")
(setq jupyter-command "/opt/homebrew/Caskroom/miniconda/base/envs/emacs-py/bin/jupyter")

(add-to-list 'exec-path "/opt/homebrew/Caskroom/miniconda/base/envs/emacs-py/bin")
(setenv "PATH" (concat "/opt/homebrew/Caskroom/miniconda/base/envs/emacs-py/bin:" (getenv "PATH")))

here is my setup code:

* Jupyter REPL Integration
   #+begin_src emacs-lisp
     (use-package jupyter
       :straight t)

     (use-package python-mode
       :straight t
       :hook (python-mode . jupyter-run-repl)
       :config
       (defun my-python-send-region ()
         "Send selected region or current line to Jupyter REPL."
         (interactive)
         (if (use-region-p)
             (jupyter-repl-send-region (region-beginning) (region-end))
           (jupyter-repl-send-line)))

       (define-key python-mode-map (kbd "S-<return>") 'my-python-send-region))

     (straight-use-package
      '(zmq
        :type git
        :host github
        :repo "nnicandro/emacs-zmq"))
     (straight-use-package 'jupyter)

   #+end_src

* Jupyter Org Mode Client
   #+begin_src emacs-lisp
   (use-package jupyter--client
     :straight jupyter
     :after ( jupyter)
     :config
     (setq -babel-default-header-args:jupyter-python '((:async . "yes") (:session . "py") (:kernel . "python3"))))
   #+end_src

I have installed Jupyter kernel. can someone tell us how to solve "ZMQ module not found" issue on Emacs when I run Jupyter-run-repl?

I have already set all these paths and there is no issues from this part. I have also installed ZMQ through conda environment and is working properly through terminal. I cannot understand why i still this error.

(setq python-shell-interpreter "/opt/homebrew/Caskroom/miniconda/base/envs/emacs-py/bin/python")
(setq python-shell-interpreter-args "")

(setq jupyter-runtime-directory "/opt/homebrew/Caskroom/miniconda/base/envs/emacs-py/share/jupyter/runtime/")
(setq jupyter-command "/opt/homebrew/Caskroom/miniconda/base/envs/emacs-py/bin/jupyter")

(add-to-list 'exec-path "/opt/homebrew/Caskroom/miniconda/base/envs/emacs-py/bin")
(setenv "PATH" (concat "/opt/homebrew/Caskroom/miniconda/base/envs/emacs-py/bin:" (getenv "PATH")))

here is my setup code:

* Jupyter REPL Integration
   #+begin_src emacs-lisp
     (use-package jupyter
       :straight t)

     (use-package python-mode
       :straight t
       :hook (python-mode . jupyter-run-repl)
       :config
       (defun my-python-send-region ()
         "Send selected region or current line to Jupyter REPL."
         (interactive)
         (if (use-region-p)
             (jupyter-repl-send-region (region-beginning) (region-end))
           (jupyter-repl-send-line)))

       (define-key python-mode-map (kbd "S-<return>") 'my-python-send-region))

     (straight-use-package
      '(zmq
        :type git
        :host github
        :repo "nnicandro/emacs-zmq"))
     (straight-use-package 'jupyter)

   #+end_src

* Jupyter Org Mode Client
   #+begin_src emacs-lisp
   (use-package jupyter--client
     :straight jupyter
     :after ( jupyter)
     :config
     (setq -babel-default-header-args:jupyter-python '((:async . "yes") (:session . "py") (:kernel . "python3"))))
   #+end_src
Share Improve this question asked Mar 6 at 17:47 Nathan DrakeNathan Drake 3114 silver badges16 bronze badges 1
  • Did you read the README for emacs-zmq? It's supposed to ask whether you want to build the module if there isn't one. – molbdnilo Commented Mar 14 at 9:04
Add a comment  | 

1 Answer 1

Reset to default 1

You can try to install pyzmq in your python environment.

/opt/homebrew/Caskroom/miniconda/base/envs/emacs-py/bin/python -m pip install pyzmq
发布评论

评论列表(0)

  1. 暂无评论