elpy icon indicating copy to clipboard operation
elpy copied to clipboard

No module named elpy.__main__ on Win10 with Python 3.10

Open Krisselack opened this issue 2 years ago • 0 comments

Summary

I got the following Issue with the current elpy on a Windows machine:

Output from Backend

There was some unexpected output from the Elpy backend. This is usually not a problem and should usually not be reported as a bug with Elpy. You can safely hide this buffer and ignore it. You can also see the output below in case there is an actual problem.

Output c:\Users\UNAME\AppData\Local\Programs\Python\Python310\python.exe: No module named elpy.main

Steps to reproduce

  1. Installed Python 3.10
  2. Installed elpy from github (melpa.org didn't work, as tar not found)

My configuration

OS: Windows 10

Result of (elpy-config)

Emacs.............: 27.2
Elpy..............: Not found (Python), 1.35.0 (Emacs Lisp)
Virtualenv........: None
Interactive Python: python 3.10.4 (c:/Users/UNAME/AppData/Local/Programs/Python/Python310/python.exe)
RPC virtualenv....: rpc-venv (c:/Users/UNAME/.emacs.d/elpy/rpc-venv)
 Python...........: C:/Users/UNAME/AppData/Local/Programs/Python/Python310/python.exe 3.10.4 (C:/Users/UNAME/AppData/Local/Programs/Python/Python310/python.exe)
 Jedi.............: 0.18.1
 Autopep8.........: 1.6.0
 Yapf.............: 0.32.0
 Black............: 22.3.0
Syntax checker....: flake8.exe (c:/Users/UNAME/AppData/Local/Programs/Python/Python310/Scripts/flake8.exe)

Elpy configuration in my init.el

(require 'elpy)
(elpy-enable)

(defun elpy-shell-save-send-region ()
  "Run `save-buffer' and `ess-eval-region-or-line-and-step' in sequence."
  (interactive)
  (save-buffer)
  (elpy-shell-send-region-or-buffer))

(eval-after-load "elpy"
  '(define-key elpy-mode-map (kbd "<C-return>") 'elpy-shell-save-send-region))

(setq elpy-rpc-python-command "C:/Users/UNAME/AppData/Local/Programs/Python/Python310/python.exe")

(when (require 'flycheck nil t)
  (setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
  (add-hook 'elpy-mode-hook 'flycheck-mode))

(setq elpy-company-add-completion-from-shell nil)


Krisselack avatar May 03 '22 08:05 Krisselack