8000 Installation error due to missing Rust Tool chain! · Issue #2811 · fastapi/fastapi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Installation error due to missing Rust Tool chain! #2811
Closed
@Jarmos-san

Description

@Jarmos-san

First check

  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the FastAPI documentation, with the integrated search.
  • I already read and followed all the tutorial in the docs and didn't find an answer.
  • I already searched in Google "How to X in FastAPI" and didn't find any information.
  • After submitting this, I commit to one of:
    • Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.
    • I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.
    • Implement a Pull Request for a confirmed bug.

Example

Here's a self-contained, minimal, reproducible, example with my use case:

Running pip install fastapi[all] on a 64-bit Windows machine with both PowerShell & Git Bash throws the following error messages:

  Downloading orjson-2.0.7.tar.gz (480 kB)
     |████████████████████████████████| 480 kB 3.3 MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: 'e:\.venv\scripts\python.exe' 'e:\.venv\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Space\AppData\Local\Temp\tmpm9nrvczg'
         cwd: C:\Users\Space\AppData\Local\Temp\pip-install-00q6owq6\orjson_a4eb6a5c825b4f828cea239cebcbe77d
    Complete output (6 lines):

    Cargo, the Rust package manager, is not installed or is not on PATH.
    This package requires Rust and Cargo to compile extensions. Install it through
    the system's package manager or via https://rustup.rs/

    Checking for Rust toolchain....
    ----------------------------------------

...

  ERROR: Command errored out with exit status 1:
   command: 'e:\.venv\scripts\python.exe' 'e:\.venv\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\Space\AppData\Local\Temp\tmpgw763q8v'
       cwd: C:\Users\Space\AppData\Local\Temp\pip-install-00q6owq6\ujson_abdb3dae46ca4793baf685983dac867b
  Complete output (5 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'ujson' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  ERROR: Failed building wheel for ujson
Failed to build ujson
ERROR: Could not build wheels for ujson which use PEP 517 and cannot be installed directly

NOTE: The messages has been truncated sinc 5942 e it repeats itself countless times as pip keeps retrying to install orjson.

Description

Running the pip install fastapi[all] command breaks due to missing Rust toolchains in the system on a 64-bit Windows 10 machine. Not sure why it's even required. Am I missing something out?

But installing the requirements individually works flawlessly. This breakage has been tested both on PowerShell & Git Bash. But I can't test it on WSL as of now due to time constraints.

Environment

  • OS: [e.g. Linux / Windows / macOS]: Windows 10 64-bit.
  • FastAPI Version [e.g. 0.3.0]: latest
  • Python version: 3.8.5

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0