File "/usr/bin/uvicorn", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3254, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3237, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3266, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 584, in _build_master
ws.require(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 901, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 787, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'uvloop>=0.14.0' distribution was not found and is required by uvicorn
CodePudding user response:
install this package fastapi-socketio.
your error is gone away.
this is basic packages requirement for fastapi run
bidict==0.21.3
click==7.1.2
fastapi==0.68.1
fastapi-socketio==0.0.8
h11==0.9.0
httptools==0.1.2
pydantic==1.8.2
python-engineio==4.2.1
python-socketio==5.4.0
starlette==0.14.2
typing-extensions==3.10.0.2
uvicorn==0.11.5
uvloop==0.16.0
websockets==8.1
CodePudding user response:
install this package fastapi-socketio.
fastapi-socketio==0.0.8
your error is gone away.
check basic packages requirement for FASTAPI
bidict==0.21.3
click==7.1.2
fastapi==0.68.1
fastapi-socketio==0.0.8
h11==0.9.0
httptools==0.1.2
pydantic==1.8.2
python-engineio==4.2.1
python-socketio==5.4.0
starlette==0.14.2
typing-extensions==3.10.0.2
uvicorn==0.11.5
uvloop==0.16.0
websockets==8.1