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

Python 3.13 support #1984

Open
fry69 opened this issue Oct 9, 2024 · 13 comments
Open

Python 3.13 support #1984

fry69 opened this issue Oct 9, 2024 · 13 comments
Labels
enhancement New feature or request

Comments

@fry69
Copy link
Contributor

fry69 commented Oct 9, 2024

Warning

Python 3.13 is currently not supported

aider supports Python version 3.9 through 3.12

Known showstoppers for Python 3.13 support:

Trying to build the aider repository with Python 3.13 on macOS currently needs these additional steps/packages ->

brew install [email protected]
brew install rust
# brew install flang does not seem to yield a working Fortran compiler which can be found later
brew install gfortran
brew install openblas
export PKG_CONFIG_PATH="/opt/homebrew/opt/openblas/lib/pkgconfig"
pip install -e . 

This results in an error at the end ->

ERROR: Ignored the following versions that require a different python version: 0.21.0 Requires-Python <3.12,>=3.8; 1.10.0 Requires-Python <3.12,>=3.8; 1.10.0rc1 Requires-Python <3.12,>=3.8; 1.10.0rc2 Requires-Python <3.12,>=3.8; 1.10.1 Requires-Python <3.12,>=3.8; 1.11.0 Requires-Python <3.13,>=3.9; 1.11.0rc1 Requires-Python <3.13,>=3.9; 1.11.0rc2 Requires-Python <3.13,>=3.9; 1.11.1 Requires-Python <3.13,>=3.9; 1.11.2 Requires-Python <3.13,>=3.9; 1.11.3 Requires-Python <3.13,>=3.9; 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11; 1.26.0 Requires-Python <3.13,>=3.9; 1.26.1 Requires-Python <3.13,>=3.9; 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10; 1.7.2 Requires-Python >=3.7,<3.11; 1.7.3 Requires-Python >=3.7,<3.11; 1.8.0 Requires-Python >=3.8,<3.11; 1.8.0rc1 Requires-Python >=3.8,<3.11; 1.8.0rc2 Requires-Python >=3.8,<3.11; 1.8.0rc3 Requires-Python >=3.8,<3.11; 1.8.0rc4 Requires-Python >=3.8,<3.11; 1.8.1 Requires-Python >=3.8,<3.11; 1.9.0 Requires-Python >=3.8,<3.12; 1.9.0rc1 Requires-Python >=3.8,<3.12; 1.9.0rc2 Requires-Python >=3.8,<3.12; 1.9.0rc3 Requires-Python >=3.8,<3.12; 1.9.1 Requires-Python >=3.8,<3.12
ERROR: Could not find a version that satisfies the requirement tree-sitter-languages==1.10.2 (from aider-chat) (from versions: none)
ERROR: No matching distribution found for tree-sitter-languages==1.10.2
@fry69 fry69 pinned this issue Oct 9, 2024
@fry69 fry69 added the enhancement New feature or request label Oct 9, 2024
@Faolain
Copy link

Faolain commented Oct 10, 2024

Related ticket/comment Aider-AI/grep-ast#7 (comment)

@pchaganti
Copy link

Seeing the same error on Mac with python 3.13.

#300 (comment)

@atemerev
Copy link

On tree-sitter-languages, there is no activity in their repo since Feb 4th, 2024. Would it be possible to fork / vendor it? Or invent any other workaround?

Python 3.13 is the default in Fedora and Mac/Homebrew now, so we should think of something.

@Kreijstal
Copy link

@themanyone
Copy link

I can install with Python 3.13 by batching the install with tree-sitter-languages from git. After git clone

pip install -U . ../py-tree-sitter-languages/

I'll tell aider bot to fix audioop deprecation. Pull request pending

@highdealist
Copy link

Failed to install on Windows 11 with python 3.13
Worked fine with 3.12
I am noob so kinda just deleted all my system files trying to fix this
Just kidding
kinda

Collecting numpy==1.24.3 (from aider-chat)
  Downloading numpy-1.24.3.tar.gz (10.9 MB)
     ---------------------------------------- 10.9/10.9 MB 5.7 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [32 lines of output]
      Traceback (most recent call last):
        File "C:\Program Files\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
          ~~~~^^
        File "C:\Program Files\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Program Files\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 112, in get_requires_for_build_wheel
          backend = _build_backend()
        File "C:\Program Files\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 77, in _build_backend
          obj = import_module(mod_path)
        File "C:\Program Files\Python313\Lib\importlib\__init__.py", line 88, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
                 ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1310, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
        File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
        File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
        File "C:\Users\Fuckmaster\AppData\Local\Temp\pip-build-env-cwqnqar7\overlay\Lib\site-packages\setuptools\__init__.py", line 16, in <module>
          import setuptools.version
        File "C:\Users\Fuckmaster\AppData\Local\Temp\pip-build-env-cwqnqar7\overlay\Lib\site-packages\setuptools\version.py", line 1, in <module>
          import pkg_resources
        File "C:\Users\Fuckmaster\AppData\Local\Temp\pip-build-env-cwqnqar7\overlay\Lib\site-packages\pkg_resources\__init__.py", line 2172, in <module>
          register_finder(pkgutil.ImpImporter, find_on_path)
                          ^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

@themanyone
Copy link

Ah, the old pkgutil ImpImporter shuffle. The ImpImporter class was removed from pkgutil in Python 3.4, and pip versions older than 10.0.0 relied on it. The message should say, "Hey, this pip is old. Want me to update it?" But instead we get an update command that doesn't work. pip install --upgrade pip might work. Didn't work for me. I wound up downloading pip and manually copying it to where it needs to go.

@paul-gauthier
Copy link
Collaborator

It should be easy to install aider with uv even if your system python is 3.13:

python -m pip install uv  # If you need to install uv
uv tool install --python python3.12 aider-chat

https://aider.chat/docs/install/uv.html

@paul-gauthier
Copy link
Collaborator

I've also got an even easier experimental install method you could try. I would love feedback on whether it works well for you.

python -m pip install aider-install
aider-install

For more info see the README:
https://github.com/Aider-AI/aider-install

@sam2kb
Copy link

sam2kb commented Dec 16, 2024

I've also got an even easier experimental install method you could try. I would love feedback on whether it works well for you.

python -m pip install aider-install
aider-install

For more info see the README: https://github.com/Aider-AI/aider-install

this worked on win11 with python 3.13

@Kreijstal
Copy link

this worked on win11 with python 3.13

this just uses python 3.12 on the bg?

@paul-gauthier
Copy link
Collaborator

this just uses python 3.12 on the bg?

Yes.

@Kreijstal
Copy link

Kreijstal commented Dec 23, 2024

archlinux just broke, we can't install aider-chat with pipx anymore, oh well, it was eating my claude allowance like crazy anyway

kreijstal@kreijstalnuc:~/git/a749bb4442714515f93efdb7f6306e69$ python --version
Python 3.13.1

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

No branches or pull requests

9 participants