致力于为用户提供真实的
主机测评数据及优惠信息

修复 Python 3.10 在 Windows 11 使用 pyreadline 错误

网友 sRGB 说:

修复 Python 3.10 在 Windows 11 使用 pyreadline 错误
https://github.com/hongwenjun/pyreadline
新电脑安装了 Python 3.10 ,使用 pyreadline 库有问题,google搜索,从两个github项目里找到2个文件的修改方法

  1. Python 3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 ** bit (AMD**)] on win32
  2. Type &*uot;****&*uot;, &*uot;copy**ght&*uot;, &*uot;credits&*uot; or &*uot;license&*uot; for **** information.
  3. Failed calling sys.__interactivehook__
  4. Traceback (most recent call last):
  5.   File &*uot;C:\Users\vip\AppData\Local\P**grams\Python\Python310\lib\site.py&*uot;, line 446, in register_readline
  6.     import readline
  7.   File &*uot;C:\Users\vip\AppData\Local\P**grams\Python\Python310\lib\site-packages\readline.py&*uot;, line 34, in <module>
  8.     rl = Readline()
  9.   File &*uot;C:\Users\vip\AppData\Local\P**grams\Python\Python310\lib\site-packages\pyreadline\rlmain.py&*uot;, line 422, in __init__
  10.     BaseReadline.__init__(self)
  11.   File &*uot;C:\Users\vip\AppData\Local\P**grams\Python\Python310\lib\site-packages\pyreadline\rlmain.py&*uot;, line 62, in __init__
  12.     mode.init_editing_mode(None)
  13.   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
  14.     self._bind_key(‘*****’,       self.self_******)
  15.   File &*uot;C:\Users\vip\AppData\Local\P**grams\Python\Python310\lib\site-packages\pyreadline\modes\basemode.py&*uot;, line 162, in _bind_key
  16.     if not callable(func):
  17.   File &*uot;C:\Users\vip\AppData\Local\P**grams\Python\Python310\lib\site-packages\pyreadline\py3k_compat.py&*uot;, line 8, in callable
  18.     ret**n isinstance(x, collections.Callable)
  19. Att**buteEr**r: module ‘collections’ has no att**bute ‘Callable’
赞(0) 打赏
未经允许不得转载:爱主机 » 修复 Python 3.10 在 Windows 11 使用 pyreadline 错误
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址