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 installing on Windows => requires rust. #133

Open
TrueBurn opened this issue Feb 12, 2025 · 1 comment
Open

Error when installing on Windows => requires rust. #133

TrueBurn opened this issue Feb 12, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@TrueBurn
Copy link

After setting up a venv then trying to install in that venv it fails because it is looking for a rust compiler for tiktoken

error: can't find Rust compiler

Collecting readmeai
  Using cached readmeai-0.5.99.post5-py3-none-any.whl.metadata (30 kB)
Collecting aiohttp<4.0.0,>=3.9.5 (from readmeai)
  Using cached aiohttp-3.11.12-cp313-cp313-win_amd64.whl.metadata (8.0 kB)
Collecting click<9.0.0,>=8.1.7 (from readmeai)
  Using cached click-8.1.8-py3-none-any.whl.metadata (2.3 kB)
Collecting gitpython<4.0.0,>=3.1.31 (from readmeai)
  Using cached GitPython-3.1.44-py3-none-any.whl.metadata (13 kB)
Collecting openai<2.0.0,>=1.16.2 (from readmeai)
  Using cached openai-1.62.0-py3-none-any.whl.metadata (27 kB)
Collecting pydantic<3.0.0,>=2.8.0 (from readmeai)
  Using cached pydantic-2.10.6-py3-none-any.whl.metadata (30 kB)
Collecting pydantic-extra-types<3.0.0,>=2.9.0 (from readmeai)
  Using cached pydantic_extra_types-2.10.2-py3-none-any.whl.metadata (3.8 kB)
Collecting pydantic-settings<3.0.0,>=2.4.0 (from readmeai)
  Using cached pydantic_settings-2.7.1-py3-none-any.whl.metadata (3.5 kB)
Collecting pyyaml<7.0.0,>=6.0.1 (from readmeai)
  Using cached PyYAML-6.0.2-cp313-cp313-win_amd64.whl.metadata (2.1 kB)
Collecting structlog<25.0.0,>=24.4.0 (from readmeai)
  Using cached structlog-24.4.0-py3-none-any.whl.metadata (7.3 kB)
Collecting tenacity<9.0.0,>=8.2.2 (from readmeai)
  Using cached tenacity-8.5.0-py3-none-any.whl.metadata (1.2 kB)
Collecting tiktoken<0.5.0,>=0.4.0 (from readmeai)
  Using cached tiktoken-0.4.0.tar.gz (25 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting aiohappyeyeballs>=2.3.0 (from aiohttp<4.0.0,>=3.9.5->readmeai)
  Using cached aiohappyeyeballs-2.4.6-py3-none-any.whl.metadata (5.9 kB)
Collecting aiosignal>=1.1.2 (from aiohttp<4.0.0,>=3.9.5->readmeai)
  Using cached aiosignal-1.3.2-py2.py3-none-any.whl.metadata (3.8 kB)
Collecting attrs>=17.3.0 (from aiohttp<4.0.0,>=3.9.5->readmeai)
  Using cached attrs-25.1.0-py3-none-any.whl.metadata (10 kB)
Collecting frozenlist>=1.1.1 (from aiohttp<4.0.0,>=3.9.5->readmeai)
  Using cached frozenlist-1.5.0-cp313-cp313-win_amd64.whl.metadata (14 kB)
Collecting multidict<7.0,>=4.5 (from aiohttp<4.0.0,>=3.9.5->readmeai)
  Using cached multidict-6.1.0-cp313-cp313-win_amd64.whl.metadata (5.1 kB)
Collecting propcache>=0.2.0 (from aiohttp<4.0.0,>=3.9.5->readmeai)
  Using cached propcache-0.2.1-cp313-cp313-win_amd64.whl.metadata (9.5 kB)
Collecting yarl<2.0,>=1.17.0 (from aiohttp<4.0.0,>=3.9.5->readmeai)
  Using cached yarl-1.18.3-cp313-cp313-win_amd64.whl.metadata (71 kB)
Collecting colorama (from click<9.0.0,>=8.1.7->readmeai)
  Using cached colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
Collecting gitdb<5,>=4.0.1 (from gitpython<4.0.0,>=3.1.31->readmeai)
  Using cached gitdb-4.0.12-py3-none-any.whl.metadata (1.2 kB)
Collecting anyio<5,>=3.5.0 (from openai<2.0.0,>=1.16.2->readmeai)
  Using cached anyio-4.8.0-py3-none-any.whl.metadata (4.6 kB)
Collecting distro<2,>=1.7.0 (from openai<2.0.0,>=1.16.2->readmeai)
  Using cached distro-1.9.0-py3-none-any.whl.metadata (6.8 kB)
Collecting httpx<1,>=0.23.0 (from openai<2.0.0,>=1.16.2->readmeai)
  Using cached httpx-0.28.1-py3-none-any.whl.metadata (7.1 kB)
Collecting jiter<1,>=0.4.0 (from openai<2.0.0,>=1.16.2->readmeai)
  Using cached jiter-0.8.2-cp313-cp313-win_amd64.whl.metadata (5.3 kB)
Collecting sniffio (from openai<2.0.0,>=1.16.2->readmeai)
  Using cached sniffio-1.3.1-py3-none-any.whl.metadata (3.9 kB)
Collecting tqdm>4 (from openai<2.0.0,>=1.16.2->readmeai)
  Using cached tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)
Collecting typing-extensions<5,>=4.11 (from openai<2.0.0,>=1.16.2->readmeai)
  Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Collecting annotated-types>=0.6.0 (from pydantic<3.0.0,>=2.8.0->readmeai)
  Using cached annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB)
Collecting pydantic-core==2.27.2 (from pydantic<3.0.0,>=2.8.0->readmeai)
  Using cached pydantic_core-2.27.2-cp313-cp313-win_amd64.whl.metadata (6.7 kB)
Collecting python-dotenv>=0.21.0 (from pydantic-settings<3.0.0,>=2.4.0->readmeai)
  Using cached python_dotenv-1.0.1-py3-none-any.whl.metadata (23 kB)
Collecting regex>=2022.1.18 (from tiktoken<0.5.0,>=0.4.0->readmeai)
  Using cached regex-2024.11.6-cp313-cp313-win_amd64.whl.metadata (41 kB)
Collecting requests>=2.26.0 (from tiktoken<0.5.0,>=0.4.0->readmeai)
  Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting idna>=2.8 (from anyio<5,>=3.5.0->openai<2.0.0,>=1.16.2->readmeai)
  Using cached idna-3.10-py3-none-any.whl.metadata (10 kB)
Collecting smmap<6,>=3.0.1 (from gitdb<5,>=4.0.1->gitpython<4.0.0,>=3.1.31->readmeai)
  Using cached smmap-5.0.2-py3-none-any.whl.metadata (4.3 kB)
Collecting certifi (from httpx<1,>=0.23.0->openai<2.0.0,>=1.16.2->readmeai)
  Using cached certifi-2025.1.31-py3-none-any.whl.metadata (2.5 kB)
Collecting httpcore==1.* (from httpx<1,>=0.23.0->openai<2.0.0,>=1.16.2->readmeai)
  Using cached httpcore-1.0.7-py3-none-any.whl.metadata (21 kB)
Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx<1,>=0.23.0->openai<2.0.0,>=1.16.2->readmeai)
  Using cached h11-0.14.0-py3-none-any.whl.metadata (8.2 kB)
Collecting charset-normalizer<4,>=2 (from requests>=2.26.0->tiktoken<0.5.0,>=0.4.0->readmeai)
  Using cached charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl.metadata (36 kB)
Collecting urllib3<3,>=1.21.1 (from requests>=2.26.0->tiktoken<0.5.0,>=0.4.0->readmeai)
  Using cached urllib3-2.3.0-py3-none-any.whl.metadata (6.5 kB)
Using cached readmeai-0.5.99.post5-py3-none-any.whl (167 kB)
Using cached aiohttp-3.11.12-cp313-cp313-win_amd64.whl (436 kB)
Using cached click-8.1.8-py3-none-any.whl (98 kB)
Using cached GitPython-3.1.44-py3-none-any.whl (207 kB)
Using cached openai-1.62.0-py3-none-any.whl (464 kB)
Using cached pydantic-2.10.6-py3-none-any.whl (431 kB)
Using cached pydantic_core-2.27.2-cp313-cp313-win_amd64.whl (2.0 MB)
Using cached pydantic_extra_types-2.10.2-py3-none-any.whl (35 kB)
Using cached pydantic_settings-2.7.1-py3-none-any.whl (29 kB)
Using cached PyYAML-6.0.2-cp313-cp313-win_amd64.whl (156 kB)
Using cached structlog-24.4.0-py3-none-any.whl (67 kB)
Using cached tenacity-8.5.0-py3-none-any.whl (28 kB)
Using cached aiohappyeyeballs-2.4.6-py3-none-any.whl (14 kB)
Using cached aiosignal-1.3.2-py2.py3-none-any.whl (7.6 kB)
Using cached annotated_types-0.7.0-py3-none-any.whl (13 kB)
Using cached anyio-4.8.0-py3-none-any.whl (96 kB)
Using cached attrs-25.1.0-py3-none-any.whl (63 kB)
Using cached distro-1.9.0-py3-none-any.whl (20 kB)
Using cached frozenlist-1.5.0-cp313-cp313-win_amd64.whl (51 kB)
Using cached gitdb-4.0.12-py3-none-any.whl (62 kB)
Using cached httpx-0.28.1-py3-none-any.whl (73 kB)
Using cached httpcore-1.0.7-py3-none-any.whl (78 kB)
Using cached jiter-0.8.2-cp313-cp313-win_amd64.whl (203 kB)
Using cached multidict-6.1.0-cp313-cp313-win_amd64.whl (28 kB)
Using cached propcache-0.2.1-cp313-cp313-win_amd64.whl (43 kB)
Using cached python_dotenv-1.0.1-py3-none-any.whl (19 kB)
Using cached regex-2024.11.6-cp313-cp313-win_amd64.whl (273 kB)
Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Using cached sniffio-1.3.1-py3-none-any.whl (10 kB)
Using cached tqdm-4.67.1-py3-none-any.whl (78 kB)
Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Using cached yarl-1.18.3-cp313-cp313-win_amd64.whl (315 kB)
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Using cached certifi-2025.1.31-py3-none-any.whl (166 kB)
Using cached charset_normalizer-3.4.1-cp313-cp313-win_amd64.whl (102 kB)
Using cached idna-3.10-py3-none-any.whl (70 kB)
Using cached smmap-5.0.2-py3-none-any.whl (24 kB)
Using cached urllib3-2.3.0-py3-none-any.whl (128 kB)
Using cached h11-0.14.0-py3-none-any.whl (58 kB)
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
  ╰─> [35 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build\lib.win-amd64-cpython-313\tiktoken
      copying tiktoken\core.py -> build\lib.win-amd64-cpython-313\tiktoken
      copying tiktoken\load.py -> build\lib.win-amd64-cpython-313\tiktoken
      copying tiktoken\model.py -> build\lib.win-amd64-cpython-313\tiktoken
      copying tiktoken\registry.py -> build\lib.win-amd64-cpython-313\tiktoken
      copying tiktoken\__init__.py -> build\lib.win-amd64-cpython-313\tiktoken
      creating build\lib.win-amd64-cpython-313\tiktoken_ext
      copying tiktoken_ext\openai_public.py -> build\lib.win-amd64-cpython-313\tiktoken_ext
      running egg_info
      writing tiktoken.egg-info\PKG-INFO
      writing dependency_links to tiktoken.egg-info\dependency_links.txt
      writing requirements to tiktoken.egg-info\requires.txt
      writing top-level names to tiktoken.egg-info\top_level.txt
      reading manifest file 'tiktoken.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching 'Makefile'
      adding license file 'LICENSE'
      writing manifest file 'tiktoken.egg-info\SOURCES.txt'
      copying tiktoken\py.typed -> build\lib.win-amd64-cpython-313\tiktoken
      running build_ext
      running build_rust
      error: can't find Rust compiler

      If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

      To update pip, run:

          pip install --upgrade pip

      and then retry package installation.

      If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.  
      [end of output]

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

ssobii2 commented Feb 16, 2025

You need to download the rust-init.exe installer, which will install rust. There is an issue with rust-docs, so if you get very low download speed on that then try this command instead

rustup toolchain install stable --profile minimal --component rustc cargo rust-std

Then run the .exe installer again so it adds necessary stuff to PATH and after that install readmeai again and it will work :)

@eli64s eli64s added the bug Something isn't working label Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants