场景:mac 下导入的 ‘select’ 包 import select,然后在 主函数 中创建的 epoll 对象 epl = select.epoll(),运行报错如下

Traceback (most recent call last):
File "tests.py", line , in <module>
emsc.run()
File "tests.py", line , in run
epoll = select.epoll()
AttributeError: module 'select' has no attribute 'epoll'

python官方文档介绍

select.epoll([sizehint=-])
(Only supported on Linux 2.5. and newer.) Returns an edge polling object,
which can be used as Edge or Level Triggered interface for I/O events;
see section Edge and Level Trigger Polling (epoll) Objects below for the methods supported by epolling objects.

答案:仅仅支持Linux2.5.44或更高版本。

参考:

https://blog.csdn.net/weixin_42250835/article/details/89573354

AttributeError: module ‘select’ has no attribute 'epoll’的更多相关文章

  1. AttributeError: module 'select' has no attribute 'epoll'

    AttributeError: module 'select' has no attribute 'epoll'   今天乌班图镜像莫名其妙损坏了,只好用Windows写并发TCP服务器的代码.运行后 ...

  2. Python AttributeError: 'Module' object has no attribute 'STARTF_USESHOWINDOW'

    夫学须志也,才须学也,非学无以广才,非志无以成学.--诸葛亮 生活有度,自得慈铭 --杜锦阳 今天新来的同事安装环境遇到个莫名其妙的问题: AttributeError: 'Module' objec ...

  3. python中引入包的时候报错AttributeError: module 'sys' has no attribute 'setdefaultencoding'解决方法?

    python中引入包的时候报错:import unittestimport smtplibimport timeimport osimport sysimp.reload(sys)sys.setdef ...

  4. Python脚本报错AttributeError: ‘module’ object has no attribute’xxx’解决方法

    最近在编写Python脚本过程中遇到一个问题比较奇怪:Python脚本完全正常没问题,但执行总报错"AttributeError: 'module' object has no attrib ...

  5. attributeError:'module' object has no attribute ** 解决办法

    写了一个小脚本,执行的时候报错: Traceback (most recent call last): File "F:/test/qrcode.py", line 109, in ...

  6. AttributeError: 'module' object has no attribute 'TornadoAsyncNotifier'

    /*************************************************************************** * AttributeError: 'modu ...

  7. AttributeError: 'module' object has no attribute 'Thread'

    $ python thread.py starting at: 2015-08-05 00:24:24Traceback (most recent call last):  File "th ...

  8. AttributeError: module 'enum' has no attribute 'IntFlag'

    Mac PyCharm新建以Python3.6.1为解释器的Django项目的时候出现以下错误提示: AttributeError: module 'enum' has no attribute 'I ...

  9. 【问题解决方案】AttributeError: module 'pygal' has no attribute 'Worldmap'

    <Python编程:从入门到实践>- 16章-16.2.5制作世界地图 import pygal 后报如标题的error 参考CSDN 解决:AttributeError: module ...

随机推荐

  1. OpenResty下载安装教程

    原文链接:http://www.studyshare.cn/software/details/1174/0 一.OpenResty简介 OpenResty是一个全功能的 Web 应用服务器.它打包了标 ...

  2. 关于logging模块

    from logging.handlers import TimedRotatingFileHandle #日志文件控制(日志删除时间设置) import logging logger=logging ...

  3. DRF(django-rest_framework)框架

    drf执行流程,APIView,Request -继承APIView(继承自view),重写了dispatch方法 -dispatch方法:1 request对象,被重新封装了,成了新的request ...

  4. prometheus学习系列十一: Prometheus pushgateway的使用

    由于网络问题或者安全问题,可能我们的数据无法直接暴露出一个entrypoint 给prometheus采集. 这个时候可能就需要一个pushgateway来作为中间者完成中转工作.  promethe ...

  5. Prometheus(五):Prometheus+Alertmanager 配置企业微信报警

    此处默认已安装Prometheus服务,服务地址:192.168.56.200  一.设置企业微信 1.1.企业微信注册(已有企业微信账号请跳过) 企业微信注册地址:https://work.weix ...

  6. delay timer的wrap around

    span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }.CodeMirror ...

  7. Python socket基本写法

    TCP:长连接,安全可靠,不会丢包,但是会发生黏包,面向流的传输,超长的数据包会被拆包发送 多条send的小数据会连在一起发送,造成黏包现象,是tcp协议内部的优化算法造成的 如果要发送特别大的数据时 ...

  8. seaborn---调色板

    一.样式控制 1.set([context,style,palette,font,...]) 一步设定美学参数. 2.axes_style([style,rc]) 返回参数字典,用于绘图的美学风格. ...

  9. JAVA 时间转换、获取

    /** * 将字符串格式的时间转换成Timestamp * * @param time * @param formatStyle * @return */ public static Timestam ...

  10. adb命令篇

    前言    Android的adb提供了很多命令,功能很强大,可以为开发和调试带来很大的便利.当然本文并不是介绍各种命令的文章,而是用于记录在平时工作中需要经常使用的命令,方便平时工作时使用,所以以后 ...