Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: have elpy install setuptools into the rpc-venv for newer Pythons #2033

Open
space88man opened this issue Oct 12, 2023 · 0 comments · May be fixed by #2035
Open

RFE: have elpy install setuptools into the rpc-venv for newer Pythons #2033

space88man opened this issue Oct 12, 2023 · 0 comments · May be fixed by #2035

Comments

@space88man
Copy link

space88man commented Oct 12, 2023

Summary

Newer versions of Python don't have distutils and with the package set that elpy installs nothiing provides pkg_resources (used by blackutil.py and jedibackend.py).

The virtualenv needs to have setuptools installed.

Steps to reproduce

Install elpy under Python 3.12 and let it create rpc-venv.

My configuration

OS

Fedora 39beta, Python 3.12, elpy-20230803.1455 (user installation from melpa)

Result of (elpy-config)

With out pkg_resources elpy can't detect any packages at all. Elpy and the virtualenv packages are all shown as None

Elpy configuration in my init.el

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

Workaround: manually install setuptools into rpc-venv OR create a separate virtualenv with all the requirements installed and set '(elpy-rpc-virtualenv-path 'current).

tacaswell added a commit to tacaswell/elpy that referenced this issue Nov 24, 2023
Closes jorgenschaefer#2033 

Required for py312 but should be safe on any version of Pyhon (setuptools was previously a transitive dependency).
@tacaswell tacaswell linked a pull request Nov 24, 2023 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant