场景: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. ubuntu开发常用收集

    命令: 1.http://blog.csdn.net/simongeek/article/details/45271089 2.http://www.jianshu.com/p/654be9c0f13 ...

  2. 详解JS与Jquery获得的对象的区别与联系

    世上无难事只怕有心人,敲代码也一样只要你用心去搞懂一件事,即使一个小小的用法对你以后也会有很大的作用: 项目虽然赶得紧但是有些问题百度找完答案解决之后,也要自己梳理一遍做到心领神会!!!今天就直接来上 ...

  3. java基础 super和this

    /** * super关键字的用法有三种: * 1.在子类的成员方法中,访问父类的成员变量 * 2.在子类的成员方法中,访问父类的成员方法 * 3.在子类的构造方法中,访问父类的构造方法 * * th ...

  4. javascript Class.method vs Class.prototype.method(类方法和对象方法)

    在stackoverflow上看到一个这样的提问,以下代码有什么区别? Class.method = function () { /* code */ } Class.prototype.method ...

  5. 女性长期没有"恩爱",会出现这4个后果?提醒:频率最好能在这个数

    一直以来,很多人认为:男性性欲比女性强! 其实:因人而异! 但不管怎么说,“性”话题在如今社会中已经不再成为隐晦谈资. 越来越多的人,可以把此话题拿到桌面上各抒己见. 总归,“性”是我们探索自我的一种 ...

  6. 【开发笔记】-通过js控制input禁止输入空格

    <input type="text" id="fname" onkeyup="myFunction(id)"> <scri ...

  7. CSRF漏洞的挖掘与利用

    0x01 CSRF的攻击原理 CSRF 百度上的意思是跨站请求伪造,其实最简单的理解我们可以这么讲,假如一个微博关注用户的一个功能,存在CSRF漏洞,那么此时黑客只需要伪造一个页面让受害者间接或者直接 ...

  8. c#: WebBrowser控件注入js代码的三种方案

    聊做备忘. 假设js代码为: string jsCode = @"function showAlert(s) {{ alert('hello, world! ' + s);}}; showA ...

  9. mac python3 安装mysqlclient

    brew install openssl export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/ pip install mysql ...

  10. 【异常】微博生成短链异常{"request":"/2/short_url/shorten.json","error_code":"10014","error":"Insufficient app permissions!"}

    一.之前的调用方式 这种方式用了大约有一年时间,之前没有问题,但是2019-8-28号突然不行了,可能是由于微博对该接口的调用做了限制.不允许通过传递source参数的方式进行请求 该接口微博API文 ...