先安装wheel
pip install wheel
去官方找对应的版本:https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
以我的版本为例:
其他版本会报错:ERROR: Twisted-20.3.0-cp39-cp39-win_amd64.whl is not a supported wheel on this platform.
离线下载完包后,将包拖动至工程目录下,直接安装即可
(venv) F:\python\gevent_test>pip install Twisted-20.3.0-cp38-cp38-win32.whl
ERROR: Twisted-20.3.0-cp38-cp38-win32.whl is not a supported wheel on this platform.
(venv) F:\python\gevent_test>pip install Twisted-20.3.0-cp38-cp38-win_amd64.whl
Processing f:\python\gevent_test\twisted-20.3.0-cp38-cp38-win_amd64.whl