网友 sRGB 说:
修复 Python 3.10 在 Windows 11 使用 pyreadline 错误
https://github.com/hongwenjun/pyreadline
新电脑安装了 Python 3.10 ,使用 pyreadline 库有问题,google搜索,从两个github项目里找到2个文件的修改方法
- Python 3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 16:14:13) [MSC v.1929 ** bit (AMD**)] on win32
- Type &*uot;****&*uot;, &*uot;copy**ght&*uot;, &*uot;credits&*uot; or &*uot;license&*uot; for **** information.
- Failed calling sys.__interactivehook__
- Traceback (most recent call last):
- File &*uot;C:\Users\vip\AppData\Local\P**grams\Python\Python310\lib\site.py&*uot;, line 446, in register_readline
- import readline
- File &*uot;C:\Users\vip\AppData\Local\P**grams\Python\Python310\lib\site-packages\readline.py&*uot;, line 34, in <module>
- rl = Readline()
- File &*uot;C:\Users\vip\AppData\Local\P**grams\Python\Python310\lib\site-packages\pyreadline\rlmain.py&*uot;, line 422, in __init__
- BaseReadline.__init__(self)
- File &*uot;C:\Users\vip\AppData\Local\P**grams\Python\Python310\lib\site-packages\pyreadline\rlmain.py&*uot;, line 62, in __init__
- mode.init_editing_mode(None)
- File &*uot;C:\Users\vip\AppData\Local\P**grams\Python\Python310\lib\site-packages\pyreadline\modes\ema**.py&*uot;, line 633, in init_editing_mode
- self._bind_key(‘*****’, self.self_******)
- File &*uot;C:\Users\vip\AppData\Local\P**grams\Python\Python310\lib\site-packages\pyreadline\modes\basemode.py&*uot;, line 162, in _bind_key
- if not callable(func):
- File &*uot;C:\Users\vip\AppData\Local\P**grams\Python\Python310\lib\site-packages\pyreadline\py3k_compat.py&*uot;, line 8, in callable
- ret**n isinstance(x, collections.Callable)
- Att**buteEr**r: module ‘collections’ has no att**bute ‘Callable’
未经允许不得转载:爱主机 » 修复 Python 3.10 在 Windows 11 使用 pyreadline 错误
爱主机