窗口中的挂起不起作用。。在
cygwin也已安装
名称错误:未定义名称“fcntl”
Traceback (most recent call last):
File "C:\Users\Smart\AppData\Local\Programs\Python\Python35-32\Scripts\hangups-script.py", line 9, in <module>
load_entry_point('hangups==0.4.1', 'console_scripts', 'hangups')()
File "c:\users\smart\appdata\local\programs\python\python35-32\lib\site-packages\hangups\ui\__main__.py", line 988, in main
}, col_scheme, palette_colors, datetimefmt, notifier
File "c:\users\smart\appdata\local\programs\python\python35-32\lib\site-packages\hangups\ui\__main__.py", line 87, in __init__
event_loop=urwid.AsyncioEventLoop(loop=loop)
File "c:\users\smart\appdata\local\programs\python\python35-32\lib\site-packages\urwid\main_loop.py", line 111, in __init__
screen = raw_display.Screen()
File "c:\users\smart\appdata\local\programs\python\python35-32\lib\site-packages\urwid\raw_display.py", line 89, in __init__
fcntl.fcntl(self._resize_pipe_rd, fcntl.F_SETFL, os.O_NONBLOCK)
NameError: name 'fcntl' is not defined
您正在使用的代码(或正在调用的模块)使用
fcntl
。 代码中使用标准库中fcntl模块的模块或代码行将导致错误,因为此函数仅在Linux上可用。在如果您能够找到错误的来源,您可以使用另一个函数或模块来解决它。在
作为@simonzackpointed out,您需要为Cygwin使用Python。在
您可能是从Windows shell安装的,也可能没有为Cygwin安装Python,或者在您的路径中有一个比Cygwin更早的Windows Python。在
在shell中执行
which
或type
,以确定调用的Python安装的路径。确保它来自Cygwin路径而不是Windows安装。在相关问题 更多 >
编程相关推荐