jorgenschaefer/elpy

elpy not working

Closed this issue · 1 comments

Summary

elpy is not running. I activated the virtual evnvironment as suggested below, but that's not working either.

My configuration

OS

Mac OS Big Sur 11.6.6

Result of (elpy-config)

# Paste it here

Elpy configuration in my init.el

Elpy Configuration

Emacs.............: 28.1
Elpy..............: Not found (Python), 1.35.0 (Emacs Lisp)
Virtualenv........: None
Interactive Python: python3 3.9.13 (/usr/local/bin/python3)
RPC virtualenv....: rpc-venv (/Users/adityakhanna/.emacs.d/elpy/rpc-venv)
 Python...........: python nil (/Users/adityakhanna/.emacs.d/elpy/rpc-venv/bin/python)
 Jedi.............: Not found
 Rope.............: Not found
 Autopep8.........: Not found
 Yapf.............: Not found
 Black............: Not found
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 Python interpreter could not find the elpy module. Please report
to: https://github.com/jorgenschaefer/elpy/issues/new.

There was an unexpected problem starting the RPC process. Please check
the following output to see if this makes sense to you. To me, it
doesn't.

<string>:28: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
{"can_connect_to_pypi": true, "rpc_python_version": "3.9.13", "elpy_version": "1.35.0", "jedi_version": "0.18.1", "jedi_latest": null, "rope_version": "1.1.1", "rope_latest": null, "autopep8_version": "1.6.0", "autopep8_latest": null, "yapf_version": "0.32.0", "yapf_latest": null, "black_version": "22.3.0", "black_latest": null}

Elpy could not connect to Pypi (or at least not quickly enough) and
check if the python packages were up-to-date. You can still try to
update all of them:

[Update python packages]

The Jedi package is not currently installed. This package is needed
for code completion, code navigation and access to documentation.

[Install jedi]

No autoformatting package is currently installed. At least one is
needed (Autopep8, Yapf or Black) to perform autoformatting (`C-c C-r
f` in a python buffer).

[Install autopep8]
[Install yapf]
[Install black]

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]

Options

`Raised' text indicates buttons; type RET or click mouse-1 on a button
to invoke its action.  Invoke [+] to expand a group, and [-] to
collapse an expanded group.  Invoke the [Group], [Face], and [Option]
buttons below to edit that item in another window.

[+]-- Group Elpy
[+]-- Group Python
[+]-- Group Virtual Environments (Pyvenv)
[ ]-- Group Completion (Company)
[+]-- Group Call Signatures (ElDoc)
[+]-- Group Inline Errors (Flymake)
[+]-- Group Code folding (hideshow)
[ ]-- Group Snippets (YASnippet)
[+]-- Group Directory Grep (rgrep)
[+]-- Group Search as You Type (ido)
[+]-- Group Django extension
[+]-- Group Autodoc extension

I used the following code and it works for me.

(pyvenv-activate "/PATH/TO/ENV")