为什么一写入monkey.patch_all()程序就报错啊。在用gevent写http服务器的时候,一用这个就报错,进程和线程都没问题。百度也找不到原因
你把你报错贴出来。
可能你对象里没有这个函数。或者语法写错了。
distribution was not found
distribution不存在,在cmd下pip install distribution 安装下库
在命令行下运行安装命令:pip install cffi==1.12.2,去尝试解决问题。参考:
pkg_resources.DistributionNotFound: The ‘cffi>=1.12.2; platform_python_implementation == “CPython“ a - 代码先锋网 pkg_resources.DistributionNotFound: The ‘cffi>=1.12.2; platform_python_implementation == “CPython“ a,代码先锋网,一个为软件开发程序员提供代码片段和技术文章聚合的网站。 https://www.codeleading.com/article/15945451803/
如有帮助,请点击采纳。
from gevent import monkey
import gevent
monkey.patch_all()
我就导入了这个库,写上monkey.patch_all() 就报错,删除就不报错。
就这么一坨东西
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'cffi>=1.12.2; platform_python_implementation == "CPython" and sys_platform == "win32"' distribution was not found and is required by the application