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 #3037

Open
paul-gauthier opened this issue Jan 28, 2025 · 10 comments
Open

Python 3.13 support #3037

paul-gauthier opened this issue Jan 28, 2025 · 10 comments
Labels
enhancement New feature or request

Comments

@paul-gauthier
Copy link
Collaborator

paul-gauthier commented Jan 28, 2025

Aider must run with python 3.9 - 3.12. It won't run with python 3.13.

That said, there are very easy ways for python3.13 users to install aider. These methods will quickly and seamlessly install aider, python3.12 and all needed dependencies in an isolated environment.

With aider-install

If you have any python 3.8+ including python 3.13, you can use aider-install to install aider, python3.12 and all needed dependencies in an isolated environment.

python -m pip install aider-install
aider-install

One-liners

These one-liners will install aider, along with python 3.12 if needed. They are based on the uv installers.

Windows

powershell -ExecutionPolicy ByPass -c "irm https://aider.chat/install.ps1 | iex"

Mac & Linux

Use curl to download the script and execute it with sh:

curl -LsSf https://aider.chat/install.sh | sh

If your system doesn't have curl, you can use wget:

wget -qO- https://aider.chat/install.sh | sh

Install with uv

You can install aider with uv:

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

This will install uv using your existing python version 3.8-3.13, and use it to install aider. If needed, uv will automatically install a separate python 3.12 to use with aider.

Also see the install docs.

@Kreijstal
Copy link

how long will python 3.12 be mantained for?
it's going to be outdated somewhen

@Astlaan
Copy link

Astlaan commented Feb 15, 2025

What's the issue causing python 3.13 to be unsupported by aider?

@manateelazycat
Copy link

When I install aider with Python 3.13, below is error, please upgrade aider to support Python 3.13, thanks.

sudo pip3 install --upgrade aider-chat --break
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Requirement already satisfied: aider-chat in /usr/lib/python3.13/site-packages (0.16.0)
Collecting aiohttp==3.8.4 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/c2/fd/1ff4da09ca29d8933fda3f3514980357e25419ce5e0f689041edb8f17dab/aiohttp-3.8.4.tar.gz (7.3 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting aiosignal==1.3.1 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/76/ac/a7305707cb852b7e16ff80eaf5692309bde30e2b1100a1fcacdc8f731d97/aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Collecting async-timeout==4.0.2 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/d6/c1/8991e7c5385b897b8c020cdaad718c5b087a6626d1d11a23e1ea87e325a7/async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting attrs==23.1.0 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/f0/eb/fcb708c7bf5056045e9e98f62b93bd7467eb718b0202e7698eb11d66416c/attrs-23.1.0-py3-none-any.whl (61 kB)
Collecting certifi==2023.5.7 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/9d/19/59961b522e6757f0c9097e4493fa906031b95b3ebe9360b2c3083561a6b4/certifi-2023.5.7-py3-none-any.whl (156 kB)
Collecting charset-normalizer==3.1.0 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/ef/81/14b3b8f01ddaddad6cdec97f2f599aa2fa466bd5ee9af99b08b7713ccd29/charset_normalizer-3.1.0-py3-none-any.whl (46 kB)
Collecting frozenlist==1.3.3 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/e9/10/d629476346112b85c912527b9080944fd2c39a816c2225413dbc0bb6fcc0/frozenlist-1.3.3.tar.gz (66 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting gitdb==4.0.10 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/21/a6/35f83efec687615c711fe0a09b67e58f6d1254db27b1013119de46f450bd/gitdb-4.0.10-py3-none-any.whl (62 kB)
Collecting GitPython==3.1.31 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/9e/8a/d1e02cc111d65b0346f70abb83c51f8593e7134bf694a4a56d1a470caaf7/GitPython-3.1.31-py3-none-any.whl (184 kB)
Collecting idna==3.4 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/fc/34/3030de6f1370931b9dbb4dad48f6ab1015ab1d32447850b9fc94e60097be/idna-3.4-py3-none-any.whl (61 kB)
Requirement already satisfied: markdown-it-py==2.2.0 in /usr/lib/python3.13/site-packages (from aider-chat) (2.2.0)
Requirement already satisfied: mdurl==0.1.2 in /usr/lib/python3.13/site-packages (from aider-chat) (0.1.2)
Collecting multidict==6.0.4 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/4a/15/bd620f7a6eb9aa5112c4ef93e7031bcd071e0611763d8e17706ef8ba65e0/multidict-6.0.4.tar.gz (51 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting openai==0.27.6 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/9f/87/838149e472c58a141fa81e2eb4cc8828cb134054b59d67637031985ca770/openai-0.27.6-py3-none-any.whl (71 kB)
Collecting prompt-toolkit==3.0.38 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/87/3f/1f5a0ff475ae6481f4b0d45d4d911824d3218b94ee2a97a8cb84e5569836/prompt_toolkit-3.0.38-py3-none-any.whl (385 kB)
Collecting Pygments==2.15.1 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/34/a7/37c8d68532ba71549db4212cb036dbd6161b40e463aba336770e80c72f84/Pygments-2.15.1-py3-none-any.whl (1.1 MB)
Collecting requests==2.30.0 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/96/80/034ffeca15c0f4e01b7b9c6ad0fb704b44e190cde4e757edbd60be404c41/requests-2.30.0-py3-none-any.whl (62 kB)
Requirement already satisfied: rich==13.3.5 in /usr/lib/python3.13/site-packages (from aider-chat) (13.3.5)
Collecting smmap==5.0.0 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/6d/01/7caa71608bc29952ae09b0be63a539e50d2484bc37747797a66a60679856/smmap-5.0.0-py3-none-any.whl (24 kB)
Collecting tqdm==4.65.0 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/e6/02/a2cff6306177ae6bc73bc0665065de51dfb3b9db7373e122e2735faf0d97/tqdm-4.65.0-py3-none-any.whl (77 kB)
Collecting urllib3==2.0.2 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/4b/1d/f8383ef593114755429c307449e7717b87044b3bcd5f7860b89b1f759e34/urllib3-2.0.2-py3-none-any.whl (123 kB)
Collecting wcwidth==0.2.6 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/20/f4/c0584a25144ce20bfcf1aecd041768b8c762c1eb0aa77502a3f0baa83f11/wcwidth-0.2.6-py2.py3-none-any.whl (29 kB)
Collecting yarl==1.9.2 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/5f/3f/04b3c5e57844fb9c034b09c5cb6d2b43de5d64a093c30529fd233e16cf09/yarl-1.9.2.tar.gz (184 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pytest==7.3.1 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/1b/d1/72df649a705af1e3a09ffe14b0c7d3be1fd730da6b98beb4a2ed26b8a023/pytest-7.3.1-py3-none-any.whl (320 kB)
Collecting tiktoken==0.4.0 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/9f/88/77a86f915a81449156375b7538c94105a34bebf00838462c9d3fced490e9/tiktoken-0.4.0.tar.gz (25 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: configargparse in /usr/lib/python3.13/site-packages (from aider-chat) (1.7)
Requirement already satisfied: PyYAML in /usr/lib/python3.13/site-packages (from aider-chat) (6.0.2)
Requirement already satisfied: backoff==2.2.1 in /usr/lib/python3.13/site-packages (from aider-chat) (2.2.1)
Collecting networkx==3.1 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/a8/05/9d4f9b78ead6b2661d6e8ea772e111fc4a9fbd866ad0c81906c11206b55e/networkx-3.1-py3-none-any.whl (2.1 MB)
Collecting diskcache==5.6.1 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/1c/87/5f5efc3606766a8a1621fecb8b8ca2111d1dad4b9b8a631579f070d47939/diskcache-5.6.1-py3-none-any.whl (45 kB)
Collecting numpy==1.24.3 (from aider-chat)
  Using cached https://mirrors.aliyun.com/pypi/packages/2c/d4/590ae7df5044465cc9fa2db152ae12468694d62d952b1528ecff328ef7fc/numpy-1.24.3.tar.gz (10.9 MB)
  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 "/usr/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
          ~~~~^^
        File "/usr/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 137, in get_requires_for_build_wheel
          backend = _build_backend()
        File "/usr/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 70, in _build_backend
          obj = import_module(mod_path)
        File "/usr/lib/python3.13/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 "/tmp/pip-build-env-g621rd4o/overlay/lib/python3.13/site-packages/setuptools/__init__.py", line 16, in <module>
          import setuptools.version
        File "/tmp/pip-build-env-g621rd4o/overlay/lib/python3.13/site-packages/setuptools/version.py", line 1, in <module>
          import pkg_resources
        File "/tmp/pip-build-env-g621rd4o/overlay/lib/python3.13/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.

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

@paul-gauthier
Copy link
Collaborator Author

@manateelazycat why not use one of the recommended install methods described above?

@manateelazycat
Copy link

why user must be use uv?

why aider can not support python 3.13 ?

aider is python project, most people use pip

@github-actions github-actions bot added the question Further information is requested label Feb 17, 2025
@Astlaan
Copy link

Astlaan commented Feb 17, 2025

why user must be use uv?

why aider can not support python 3.13 ?

aider is python project, most people use pip

Many projects get broken in new versions of python. It's normal.
As Paul said, you can seamlessly install Aider with:

pip install aider-install
aider-install

Yes, it uses uv internally, but there's no problem with that. In fact, it's pip that's at fault for not providing a way to install tools in a isolated manner, like pipx or uv allow.
You will miss nothing. You can still use whatever version of python you wish on your python repository, and aider uses it's own version. To you it should be seamless.

Copy link

github-actions bot commented Mar 4, 2025

I'm labeling this issue as stale because it has been open for 2 weeks with no activity. If there are no additional comments, I will close it in 7 days.

Note: A bot script made these updates to the issue.

@github-actions github-actions bot added the stale label Mar 4, 2025
@MatthewZMD
Copy link
Contributor

Before this story becomes completely stale, do we know what's the biggest blocker to get to py 3.13?

@Kreijstal
Copy link

Before this story becomes completely stale, do we know what's the biggest blocker to get to py 3.13?

dependencies, mostly tree-sitter

@github-actions github-actions bot removed the stale label Mar 4, 2025
claui added a commit to claui/aider that referenced this issue Mar 5, 2025
Commit 66c24fa pinned NumPy to v1.x due to an upstream incompatibility
in sentence-transformers.

In September 2024 [1], Aider picked up sentence-transformers v3.1.1,
which contains a fix for the NumPy 2 incompatibility [2].

To help unblock PR Aider-AI#3037 [3], bump NumPy to v2.0.2, the most recent
version still compatible to Python 3.9.

[1]: Aider-AI@2ca093f
[2]: UKPLab/sentence-transformers#2937
[3]: Aider-AI#3037
claui added a commit to claui/aider that referenced this issue Mar 8, 2025
Commit 66c24fa pinned NumPy to v1.x due to an upstream incompatibility
in sentence-transformers.

In September 2024 [1], Aider picked up sentence-transformers v3.1.1,
which contains a fix for the NumPy 2 incompatibility [2].

To help unblock PR Aider-AI#3037 [3], bump NumPy to v2.0.2, the most recent
version still compatible to Python 3.9.

[1]: Aider-AI@2ca093f
[2]: UKPLab/sentence-transformers#2937
[3]: Aider-AI#3037
claui added a commit to claui/aider that referenced this issue Mar 9, 2025
Commit 66c24fa pinned NumPy to v1.x due to an upstream incompatibility
in sentence-transformers.

In September 2024 [1], Aider picked up sentence-transformers v3.1.1,
which contains a fix for the NumPy 2 incompatibility [2].

To help unblock PR Aider-AI#3037 [3], bump NumPy to v2.0.2, the most recent
version still compatible to Python 3.9.

[1]: Aider-AI@2ca093f
[2]: UKPLab/sentence-transformers#2937
[3]: Aider-AI#3037
@paul-gauthier paul-gauthier added enhancement New feature or request and removed question Further information is requested labels Mar 12, 2025
@alfaix
Copy link

alfaix commented Mar 14, 2025

Tangentially related to the matter: dev installation (with uv sync) does not work as contourpy (a dev only dependency) dropped support for python 3.9 some time ago.

UV says

  ╰─▶ Because the requested Python version (>=3.9, <3.13) does not satisfy Python>=3.10 and contourpy==1.3.1 depends on Python>=3.10, we can conclude that contourpy==1.3.1
      cannot be used.
      And because aider-chat[dev] depends on contourpy==1.3.1 and your project requires aider-chat[dev], we can conclude that your project's requirements are unsatisfiable.

      hint: The `requires-python` value (>=3.9, <3.13) includes Python versions that are not supported by your dependencies (e.g., contourpy==1.3.1 only supports >=3.10).
      Consider using a more restrictive `requires-python` value (like >=3.10).

3.9 just has a few months to live so maybe requires-python for aider can also be bumped to 3.10

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

6 participants