简体   繁体   中英

fastapi uvicorn No module named 'asgiref.typing'

I have created a simple fastapi application. Once I want to serve it with uvicron I got this error;

ModuleNotFoundError: No module named 'asgiref.typing'

I have installed it via conda python 3.8.12. those packages were installed

  asgiref            pkgs/main/noarch::asgiref-3.4.1-pyhd3eb1b0_0
  click              pkgs/main/noarch::click-8.0.1-pyhd3eb1b0_0
  h11                pkgs/main/noarch::h11-0.12.0-pyhd3eb1b0_0
  importlib-metadata pkgs/main/win-64::importlib-metadata-4.8.1-py38haa95532_0
  python_abi         conda-forge/win-64::python_abi-3.8-2_cp38

I have tired all possible solution without a result, any hint?

您应该升级asgiref

pip install --upgrade asgiref

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM