Skip to content

Installing with "[debug-server]" requires Rust #3801

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

Open
buurro opened this issue Mar 8, 2025 · 2 comments
Open

Installing with "[debug-server]" requires Rust #3801

buurro opened this issue Mar 8, 2025 · 2 comments

Comments

@buurro
Copy link
Contributor

buurro commented Mar 8, 2025

Installing Strawberry via pip install 'strawberry-graphql[debug-server]' (or uv) requires the Rust toolchain to be installed because of libcst:

(...)
running build_ext
running build_rust
error: can't find Rust compiler
(...)
ERROR: Failed building wheel for libcst

I was wondering if libcst is actually needed for the debug server to work.

Tested on macOS x86_64, Python 3.12.9

@buurro
Copy link
Contributor Author

buurro commented Mar 8, 2025

Trying to run the debug server with the other dependencies installed manually throws the following:

Traceback (most recent call last):
  File "/Users/marco/Documents/projects/uniwhy/.venv/lib/python3.12/site-packages/strawberry/cli/__init__.py", line 5, in <module>
    from .commands.schema_codegen import (
  File "/Users/marco/Documents/projects/uniwhy/.venv/lib/python3.12/site-packages/strawberry/cli/commands/schema_codegen.py", line 7, in <module>
    from strawberry.schema_codegen import codegen
  File "/Users/marco/Documents/projects/uniwhy/.venv/lib/python3.12/site-packages/strawberry/schema_codegen/__init__.py", line 10, in <module>
    import libcst as cst
ModuleNotFoundError: No module named 'libcst'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/marco/Documents/projects/uniwhy/.venv/bin/strawberry", line 4, in <module>
    from strawberry.cli import run
  File "/Users/marco/Documents/projects/uniwhy/.venv/lib/python3.12/site-packages/strawberry/cli/__init__.py", line 17, in <module>
    raise MissingOptionalDependenciesError(extras=["cli"]) from exc
strawberry.exceptions.missing_dependencies.MissingOptionalDependenciesError

@amjha
Copy link

amjha commented Mar 15, 2025

I had the similar issue with rust v1.61.0. Upgrading it to v1.85 helped me get rid of this issue.

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

No branches or pull requests

2 participants