我想使用FastAPI。我使用pip安装了它,当我将它添加(并运行)到我的项目中时,如下所示:我得到了这个错误:
cannot import name 'FastApi' from 'fastapi' (C:\Users\xxx\PycharmProjects\MyBank\venv\lib\site-packages\fastapi\__init__.py).
我已经用venv和uvicorn安装了fastapi和requirements.txt,我也在运行Python3.5(也许这就是问题所在?)./.venv/lib/python3.5/site-packages/uvicorn/__init__.py", line 1, in <module> File "/home/...../.venv
/lib/python3.8/site-packages/fastapi/applications.py", line 208, in __call__
await super().File "/opt/anaconda3/envs/fastapi38/lib/python3.8/site-packages/starlette/exceptions.py&q
/anaconda3/envs/FastAPI/lib/python3.9/multiprocessing/process.py", line 108, in run
self."/Users/supergrammer/anaconda3/envs/FastAPI/lib/python3.9/site-packages/fasta