场景: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. jQuery实现form表单基于ajax无刷新提交方法详解

    本文实例讲述了jQuery实现form表单基于ajax无刷新提交方法.分享给大家供大家参考,具体如下: 首先,新建Login.html页面: <!DOCTYPE html PUBLIC &quo ...

  2. 通过Nginx为网站配置二级域名

    目录 配置域名解析 配置Nginx 重启Nginx 补充 需求:服务器上面运行多个项目:实现每个二级域名访问对应项目: 服务器:阿里云服务器:域名:阿里云注册: 配置域名解析 即配置DNS解析.一定要 ...

  3. 12、微信小程序实现授权

    在index.wxml中: <!--index.wxml--> <view wx:if="{{isHide}}"> <view wx:if=" ...

  4. HashMap的源码分析与实现 伸缩性角度看hashmap的不足

    本文介绍 1.hashmap的概念 2.hashmap的源码分析 3.hashmap的手写实现 4.伸缩性角度看hashmap的不足 一.HashMap的概念 HashMap可以将其拆分为Hash散列 ...

  5. 在页面获取本地电脑IP

    <%@ page language="java" import="java.util.*" contentType="text/html; ch ...

  6. Zebra-打印特殊字符

    Zebra在打印一些特殊的字符时,会出异常. 在要打印的字符串前加  ^FH  然后将字符换成 ASCii编码或utf-8编码的16进制,在前面加_,如D094写成_DO_94 查看字符的编码 htt ...

  7. CentOS6.7安装部署之Tomcat多实例

    Tomcat单机多实例配置 操作前的准备:关闭防火墙,配置好IP地址,安装好JAVA环境 1.首先创建tomcat所有实例共同的工作目录/data/webapps以及tomcat所有实例的所在目录/d ...

  8. CentOS7 开机提示Initial setup of CentOS Linux 7 (Core)

    一.开机以后提示信息如下 二.解决方法 . 输入1,按Enter同意许可协议 . 输入2,按Enter同意许可协议 . 输入q,按Enter退出 . 输入yes,按Enter确定 . 完成重启后即可正 ...

  9. 分布式限流组件-基于Redis的注解支持的Ratelimiter

    原文:https://juejin.im/entry/5bd491c85188255ac2629bef?utm_source=coffeephp.com 在分布式领域,我们难免会遇到并发量突增,对后端 ...

  10. centos7服务器部署django项目。

    用到的工具,xftp(文件互传),xshell(远程连接) aliyun服务器防火墙开启的端口.80,22(ssh),3306(mysql),8000,9090 部署项目: 1,安装nginx 1&g ...