Kludex / fastapi-tips

FastAPI Tips by The FastAPI Expert!
2.11k stars 79 forks source link

First tip not working #22

Closed Pandorius closed 4 months ago

Pandorius commented 4 months ago

I'm trying to apply the first tip with the following packages in the requirements.txt file:

fastapi[all]==0.111.0
httptools==0.6.1
uvloop==0.4.12

But I get this error:

ERROR: Cannot install httptools==0.6.1, uvicorn[standard]==0.13.3, uvicorn[standard]==0.13.4, uvicorn[standard]==0.15.0, uvicorn[standard]==0.16.0, uvicorn[standard]==0.17.0.post1, uvicorn[standard]==0.17.1, uvicorn[standard]==0.17.2, uvicorn[standard]==0.17.3, uvicorn[standard]==0.17.4, uvicorn[standard]==0.17.5, uvicorn[standard]==0.17.6, uvicorn[standard]==0.18.0, uvicorn[standard]==0.18.1, uvicorn[standard]==0.18.2, uvicorn[standard]==0.18.3, uvicorn[standard]==0.19.0, uvicorn[standard]==0.20.0, uvicorn[standard]==0.21.0, uvicorn[standard]==0.21.1, uvicorn[standard]==0.22.0, uvicorn[standard]==0.23.0, uvicorn[standard]==0.23.1, uvicorn[standard]==0.23.2, uvicorn[standard]==0.24.0, uvicorn[standard]==0.24.0.post1, uvicorn[standard]==0.25.0, uvicorn[standard]==0.26.0, uvicorn[standard]==0.27.0, uvicorn[standard]==0.27.0.post1, uvicorn[standard]==0.27.1, uvicorn[standard]==0.28.0, uvicorn[standard]==0.28.1, uvicorn[standard]==0.29.0, uvicorn[standard]==0.30.0, uvicorn[standard]==0.30.1 and uvloop==0.4.12 because these package versions have conflicting dependencies. The conflict is caused by: The user requested uvloop==0.4.12 uvicorn[standard] 0.30.1 depends on uvloop!=0.15.0, !=0.15.1 and >=0.14.0; (sys_platform != "win32" and (sys_platform != "cygwin" and platform_python_implementation != "PyPy")) and extra == "standard" The user requested uvloop==0.4.12 uvicorn[standard] 0.30.0 depends on uvloop!=0.15.0, !=0.15.1 and >=0.14.0; (sys_platform != "win32" and (sys_platform != "cygwin" and platform_python_implementation != "PyPy")) and extra == "standard" [...] The user requested httptools==0.6.1 uvicorn[standard] 0.17.5 depends on httptools<0.4.0 and >=0.2.0; extra == "standard" The user requested httptools==0.6.1 uvicorn[standard] 0.17.4 depends on httptools<0.4.0 and >=0.2.0; extra == "standard" The user requested httptools==0.6.1 [...]

I'm not the most seasoned developer but this gives me the impression that uvicorn does actually contain httptools and uvloop. Am I missing something?

Kludex commented 4 months ago

The uvloop version you are pinning is too old.