Installation error due to missing Rust Tool chain! #6843
Replies: 8 comments
-
It is not required, only if you want to use |
Beta Was this translation helpful? Give feedback.
-
Ah, I see! It makes sense now. In that context, I guess the issue could be related to #820 as well. Leaving it open for now then. cc @tiangolo |
Beta Was this translation helpful? Give feedback.
-
Well, sure. The #820 is no more valid since they found a maintainer but Starlette recently dropped down support for #2335 re-added to make Starlette upgrade non breaking-change but on the other hand C dependencies breaking builds too, kinda tricky one. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the help @ycd ! 🙇 @Jarmos-san I think it's very probable that you are using an old version of Try this in a PowerShell: $ python -m venv env
$ .\env\Scripts\Activate.ps1
# This is the key, upgrade pip inside your virtual environment
$ python -m pip install --upgrade pip
$ python -m pip install "fastapi[all]"
Downloading pydantic-1.8.1-cp36-cp36m-manylinux2014_x86_64.whl
...
Downloading orjson-3.5.2-cp36-cp36m-manylinux2014_x86_64.whl
...
Downloading ujson-3.2.0-cp36-cp36m-manylinux1_x86_64.whl ...of course, in your case it would download Windows versions, not Linux versions. But it should work the same without needing to compile anything. |
Beta Was this translation helpful? Give feedback.
-
@tiangolo thanks for responding back & first things first, thanks for creating FastAPI. As for the issue, it's still not resolved on my machine. For further reference I'm using But to be honest, it's a trivial issue in my opinion. I've been using FastAPI for a couple of my projects. And, I didn't come across any dependency issues as long as I download each of them specifically. I'm also not sure how to debug this type of issues so I can close the issue if need be. Do let me know, what you think? PS: I think it would be wise to add a small heads-up text in the documentations stating this issue for Windows users. Pip can't actually install |
Beta Was this translation helpful? Give feedback.
-
That's strange, I just restarted in Windows to test this, and it worked as expected with PowerShell, in a freshly created environment: PowerShell logs 👈PS C:\Users\User\code\test-rusty> python -m venv env
PS C:\Users\User\code\test-rusty> .\env\Scripts\Activate.ps1
(env) PS C:\Users\User\code\test-rusty> get-command python
CommandType Name Version Source
----------- ---- ------- ------
Application python.exe 3.8.315... C:\Users\User\code\test-rusty\env\Scri...
(env) PS C:\Users\User\code\test-rusty> pip --version pip 19.2.3 from c:\users\user\code\test-rusty\env\lib\site-packages\pip (python 3.8)
(env) PS C:\Users\User\code\test-rusty> python -m pip install -U pip Collecting pip
Downloading https://files.pythonhosted.org/packages/cd/6f/43037c7bcc8bd8ba7c9074256b1a11596daa15555808ec748048c1507f08/pip-21.1.1-py3-none-any.whl (1.5MB)
|████████████████████████████████| 1.6MB 3.2MB/s
Installing collected packages: pip
Found existing installation: pip 19.2.3
Uninstalling pip-19.2.3:
Successfully uninstalled pip-19.2.3
Successfully installed pip-21.1.1
(env) PS C:\Users\User\code\test-rusty> get-command pip
CommandType Name Version Source
----------- ---- ------- ------
Application pip.exe 0.0.0.0 C:\Users\User\code\test-rusty\env\Scri...
(env) PS C:\Users\User\code\test-rusty> pip --version pip 21.1.1 from c:\users\user\code\test-rusty\env\lib\site-packages\pip (python 3.8)
(env) PS C:\Users\User\code\test-rusty> pip install fastapi[all]
Collecting fastapi[all]
Downloading fastapi-0.65.0-py3-none-any.whl (50 kB)
|████████████████████████████████| 50 kB 3.4 MB/s
Collecting pydantic<2.0.0,>=1.0.0
Downloading pydantic-1.8.1-cp38-cp38-win_amd64.whl (2.0 MB)
|████████████████████████████████| 2.0 MB 6.4 MB/s
Collecting starlette==0.14.2
Downloading starlette-0.14.2-py3-none-any.whl (60 kB)
|████████████████████████████████| 60 kB 3.5 MB/s
Collecting aiofiles<0.6.0,>=0.5.0
Downloading aiofiles-0.5.0-py3-none-any.whl (11 kB)
Collecting jinja2<3.0.0,>=2.11.2
Downloading Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
|████████████████████████████████| 125 kB 6.4 MB/s
Collecting pyyaml<6.0.0,>=5.3.1
Downloading PyYAML-5.4.1-cp38-cp38-win_amd64.whl (213 kB)
|████████████████████████████████| 213 kB ...
Collecting graphene<3.0.0,>=2.1.8
Using cached graphene-2.1.8-py2.py3-none-any.whl (107 kB)
Collecting itsdangerous<2.0.0,>=1.1.0
Using cached itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting requests<3.0.0,>=2.24.0
Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
|████████████████████████████████| 61 kB 4.0 MB/s
Collecting ujson<5.0.0,>=4.0.1
Downloading ujson-4.0.2-cp38-cp38-win_amd64.whl (44 kB)
|████████████████████████████████| 44 kB ...
Collecting async_generator<2.0.0,>=1.10
Using cached async_generator-1.10-py3-none-any.whl (18 kB)
Collecting async_exit_stack<2.0.0,>=1.0.1
Using cached async_exit_stack-1.0.1-py3-none-any.whl (4.7 kB)
Collecting orjson<4.0.0,>=3.2.1
Downloading orjson-3.5.2-cp38-none-win_amd64.whl (177 kB)
|████████████████████████████████| 177 kB ...
Collecting email_validator<2.0.0,>=1.1.1
Downloading email_validator-1.1.2-py2.py3-none-any.whl (17 kB)
Collecting uvicorn[standard]<0.14.0,>=0.12.0
Downloading uvicorn-0.13.4-py3-none-any.whl (46 kB)
|████████████████████████████████| 46 kB 3.2 MB/s
Collecting python-multipart<0.0.6,>=0.0.5
Using cached python-multipart-0.0.5.tar.gz (32 kB)
Collecting idna>=2.0.0
Downloading idna-3.1-py3-none-any.whl (58 kB)
|████████████████████████████████| 58 kB ...
Collecting dnspython>=1.15.0
Downloading dnspython-2.1.0-py3-none-any.whl (241 kB)
|████████████████████████████████| 241 kB ...
Collecting graphql-core<3,>=2.1
Downloading graphql_core-2.3.2-py2.py3-none-any.whl (252 kB)
|████████████████████████████████| 252 kB ...
Collecting graphql-relay<3,>=2
Using cached graphql_relay-2.0.1-py3-none-any.whl (20 kB)
Collecting aniso8601<=7,>=3
Using cached aniso8601-7.0.0-py2.py3-none-any.whl (42 kB)
Collecting six<2,>=1.10.0
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting promise<3,>=2.3
Using cached promise-2.3.tar.gz (19 kB)
Collecting rx<2,>=1.6
Using cached Rx-1.6.1-py2.py3-none-any.whl (179 kB)
Collecting MarkupSafe>=0.23
Using cached MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl (16 kB)
Collecting typing-extensions>=3.7.4.3
Downloading typing_extensions-3.10.0.0-py3-none-any.whl (26 kB)
Collecting idna>=2.0.0
Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
|████████████████████████████████| 58 kB ...
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.4-py2.py3-none-any.whl (153 kB)
|████████████████████████████████| 153 kB ...
Collecting certifi>=2017.4.17
Downloading certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
|████████████████████████████████| 147 kB ...
Collecting chardet<5,>=3.0.2
Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
|████████████████████████████████| 178 kB 6.4 MB/s
Collecting h11>=0.8
Downloading h11-0.12.0-py3-none-any.whl (54 kB)
|████████████████████████████████| 54 kB 707 kB/s
Collecting click==7.*
Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
|████████████████████████████████| 82 kB 515 kB/s
Collecting watchgod>=0.6
Downloading watchgod-0.7-py3-none-any.whl (11 kB)
Collecting colorama>=0.4
Downloading colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting python-dotenv>=0.13
Downloading python_dotenv-0.17.1-py2.py3-none-any.whl (18 kB)
Collecting websockets==8.*
Using cached websockets-8.1-cp38-cp38-win_amd64.whl (66 kB)
Using legacy 'setup.py install' for promise, since package 'wheel' is not installed.
Using legacy 'setup.py install' for python-multipart, since package 'wheel' is not installed.
Installing collected packages: six, rx, promise, typing-extensions, h11, graphql-core, click, websockets, watchgod, uvicorn, urllib3, starlette, pyyaml, python-dotenv, pydantic, MarkupSafe, idna, graphql-relay, dnspython, colorama, chardet, certifi, aniso8601, ujson, requests, python-multipart, orjson, jinja2, itsdangerous, graphene, fastapi, email-validator, async-generator, async-exit-stack, aiofiles
Running setup.py install for promise ... done
Running setup.py install for python-multipart ... done
Successfully installed MarkupSafe-1.1.1 aiofiles-0.5.0 aniso8601-7.0.0 async-exit-stack-1.0.1 async-generator-1.10 certifi-2020.12.5 chardet-4.0.0 click-7.1.2 colorama-0.4.4 dnspython-2.1.0 email-validator-1.1.2 fastapi-0.65.0 graphene-2.1.8 graphql-core-2.3.2 graphql-relay-2.0.1 h11-0.12.0 idna-2.10 itsdangerous-1.1.0 jinja2-2.11.3 orjson-3.5.2 promise-2.3 pydantic-1.8.1 python-dotenv-0.17.1 python-multipart-0.0.5 pyyaml-5.4.1 requests-2.25.1 rx-1.6.1 six-1.16.0 starlette-0.14.2 typing-extensions-3.10.0.0 ujson-4.0.2 urllib3-1.26.4 uvicorn-0.13.4 watchgod-0.7 websockets-8.1
(env) PS C:\Users\User\code\test-rusty> But anyway, I'm glad you solved your problem. I guess we can probably close this issue then. And if someone else finds a way to replicate the problem we can check it again. |
Beta Was this translation helpful? Give feedback.
-
Thanks @tiangolo I had the same problem and updating pip solved it. :) |
Beta Was this translation helpful? Give feedback.
-
I also encountered this but I found that switching to a 64-bit python environment fixed the issue for me. I was already using pip 21.2.4 so pip was up to date. |
Beta Was this translation helpful? Give feedback.
-
First check
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:NOTE: The messages has been truncated since it repeats itself countless times as
pip
keeps retrying to installorjson
.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
Beta Was this translation helpful? Give feedback.
All reactions