# Installation issues Python 3.13

**URL:** <https://community.crewai.com/t/installation-issues-python-3-13/1736>\
**Category:** General\
**Tags:** tools\_issues, crewai\
**Created:** [November 30, 2024, 10:30am UTC](https://community.crewai.com/t/installation-issues-python-3-13/1736 "2024-11-30T10:30:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trevor](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/trevor/32/1263_2.png) [@Trevor](https://community.crewai.com/u/Trevor)\
**Post date:** [November 30, 2024, 10:30am UTC](https://community.crewai.com/t/installation-issues-python-3-13/1736/1 "2024-11-30T10:30:02Z")

</div>

Despite the official CrewAI installation instructions indicating `Python >=3.10 <=3.13`,  
command “pip install crewai” fails at dependency tiktoken, attempts to build tiktoken-0.7.0, which does not build on Python 3.13, pyo3 version not supported.

Perhaps a dependency bump to tiktoken-0.8.0 (released Oct 4th) might help?

Error message indicated:

* * *

Building wheels for collected packages: tiktoken  
Building wheel for tiktoken (pyproject.toml) … error  
error: subprocess-exited-with-error

× Building wheel for tiktoken (pyproject.toml) did not run successfully.  
│ exit code: 1  
╰─\> [130 lines of output]  
…  
error: failed to run custom build command for `pyo3-ffi v0.20.3`

```
  Caused by:
    process didn't exit successfully: `C:\Users\<username>\AppData\Local\Temp\pip-install-7lov9mzv\tiktoken_d3c10f57e5a044198ab2f2605f76cf80\target\release\build\pyo3-ffi-4512adfd46cc9bfd\build-script-build` (exit code: 1)

```

— stderr  
error: the configured Python interpreter version (3.13) is newer than PyO3’s maximum supported version (3.12)  
= help: please check if an updated version of PyO3 is available. Current version: 0.20.3  
odule --crate-type cdylib --` failed with code 101  
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.roblem with pip.  
ERROR: Failed building wheel for tiktoken  
Failed to build tiktoken ml based projects (tiktoken)  
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (tiktoken)

This is a dependency rabbit hole for new users, who are likely to want the most up to date versions of tools, this may present a barrier to adoption.

---

<div class="post-metadata">

**Author:** ![Trevor](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/trevor/32/1263_2.png) [@Trevor](https://community.crewai.com/u/Trevor)\
**Post date:** [November 30, 2024, 10:51am UTC](https://community.crewai.com/t/installation-issues-python-3-13/1736/2 "2024-11-30T10:51:01Z")

</div>

For Visual Studio Code (PowerShell terminal), the following commands allowed the build of tiktoken-0.7.0 to succeed:

```auto
$env:PYO3_USE_ABI3_FORWARD_COMPATIBILITY = "1"
pip install crewai

```

It’s too early to say if this is a good idea at all or if it will break anything, but it’s one less hurdle.

Good luck all!

---

<div class="post-metadata">

**Author:** ![viz](https://avatars.discourse-cdn.com/v4/letter/v/50afbb/32.png) [@viz](https://community.crewai.com/u/viz)\
**Post date:** [December 5, 2024, 12:43am UTC](https://community.crewai.com/t/installation-issues-python-3-13/1736/3 "2024-12-05T00:43:48Z")

</div>

For me it only worked when I downgraded to python 3.12.8

---

<div class="post-metadata">

**Author:** ![akumaranand01](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/akumaranand01/32/1384_2.png) [@akumaranand01](https://community.crewai.com/u/akumaranand01)\
**Post date:** [December 9, 2024, 7:43am UTC](https://community.crewai.com/t/installation-issues-python-3-13/1736/4 "2024-12-09T07:43:08Z")

</div>

> [@Trevor](#):
>
> `$env:PYO3_USE_ABI3_FORWARD_COMPATIBILITY = "1"`

Didn’t work for me. My python version is 3.13 and Visual Studio Code version is 1.95.2

---

<div class="post-metadata">

**Author:** ![Nils](https://avatars.discourse-cdn.com/v4/letter/n/d6d6ee/32.png) [@Nils](https://community.crewai.com/u/Nils)\
**Post date:** [December 27, 2024, 1:08pm UTC](https://community.crewai.com/t/installation-issues-python-3-13/1736/5 "2024-12-27T13:08:19Z")

</div>

I tried this as well. Did not work. So I am stuck in the same depndency problem with python 3.13.1 on MAC.

---

<div class="post-metadata">

**Author:** ![harshana](https://avatars.discourse-cdn.com/v4/letter/h/4491bb/32.png) [@harshana](https://community.crewai.com/u/harshana)\
**Post date:** [January 1, 2025, 4:29am UTC](https://community.crewai.com/t/installation-issues-python-3-13/1736/6 "2025-01-01T04:29:44Z")

</div>

This worked for me. Thank you

---

<div class="post-metadata">

**Author:** ![tonykipkemboi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/tonykipkemboi/32/4070_2.png) [@tonykipkemboi](https://community.crewai.com/u/tonykipkemboi)\
**Post date:** [January 3, 2025, 3:09pm UTC](https://community.crewai.com/t/installation-issues-python-3-13/1736/7 "2025-01-03T15:09:56Z")

</div>

We updated the docs to show the stable python versions to use with CrewAI **Python \>=3.10 and \<3.13**

_TLDR: v 3.13 is unstable and will throw the pyo3 error from tiktoken package, so do not use it._

> **[Installation - CrewAI](https://docs.crewai.com/installation)**
>
> Get started with CrewAI - Install, configure, and build your first AI crew
