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

Error when compiling C extension of Python3 in Python 3.12.7 #1106

Closed
2 of 6 tasks
jiangyinzuo opened this issue Nov 20, 2024 · 2 comments
Closed
2 of 6 tasks

Error when compiling C extension of Python3 in Python 3.12.7 #1106

jiangyinzuo opened this issue Nov 20, 2024 · 2 comments
Labels

Comments

@jiangyinzuo
Copy link
Contributor

  • vim or neovim?
    • vim
    • neovim
  • Output of vim --version or nvim --version:
  • Output of :echo has("python"): 0
  • Output of :echo has("python3"): 1
  • Output of :echo &pythondll(only vim, not neovim):
  • Output of :echo &pythonthreedll(only vim, not neovim):
  • Output of :py print(sys.version):
  • Output of :py3 print(sys.version): 3.12.7 (main, Nov 6 2024, 18:29:01) [GCC 14.2.0]
  • Output of :echo g:Lf_Debug_Cmd:
  • Output of :echo g:Lf_FilesFromCache:
  • Operating system:
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Configurations related to LeaderF in vimrc:

Describe your question, feature request, or bug.

Begin to compile C extension of Python3 ...
Traceback (most recent call last):
  File "/root/plugged/LeaderF/autoload/leaderf/fuzzyMatch_C/setup.py", line 5, in <module>
    from setuptools import setup
ImportError: cannot import name 'setup' from 'setuptools' (unknown location)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/plugged/LeaderF/autoload/leaderf/fuzzyMatch_C/setup.py", line 8, in <module>
    from distutils.core import setup
ModuleNotFoundError: No module named 'distutils'
Python 3.12.7 (main, Nov  6 2024, 18:29:01) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from setuptools import setup
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'setup' from 'setuptools' (unknown location)
>>>

distutils module has been removed in Python 3.12 python/cpython#92584

Steps to reproduce

Actual behaviour

Expected behaviour

@Yggdroot
Copy link
Owner

Have a try the solutions in https://stackoverflow.com/questions/69919970/no-module-named-distutils-util-but-distutils-installed/76691103#76691103.

@Yggdroot Yggdroot added the FAQ label Nov 21, 2024
@Yggdroot Yggdroot pinned this issue Nov 21, 2024
@jiangyinzuo
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants