prompt-toolkit / ptterm

Terminal emulator widget for prompt_toolkit applications.
BSD 3-Clause "New" or "Revised" License
41 stars 11 forks source link

Missing dependency #11

Open jupiterbjy opened 3 months ago

jupiterbjy commented 3 months ago

Using example from this repo:

https://github.com/prompt-toolkit/ptterm/blob/ead3a206d950a8f9a201a99da886d5325dfd86aa/examples/terminal-and-textarea.py#L1-L82

Traceback (most recent call last):
  File "E:\Programs\Jetbrains\Toolbox\PyCharm Professional\plugins\python\helpers\pydev\pydevd.py", line 1551, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Programs\Jetbrains\Toolbox\PyCharm Professional\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "E:\github\llama-in-one\testbed\prompt_toolkit_markdown_realtime_demo.py", line 82, in <module>
    main()
  File "E:\github\llama-in-one\testbed\prompt_toolkit_markdown_realtime_demo.py", line 21, in main
    term1 = Terminal()
            ^^^^^^^^^^
  File "C:\Users\jupiterbjy\AppData\Local\Programs\Python\Python312\Lib\site-packages\ptterm\terminal.py", line 226, in __init__
    self.terminal_control = _TerminalControl(
                            ^^^^^^^^^^^^^^^^^
  File "C:\Users\jupiterbjy\AppData\Local\Programs\Python\Python312\Lib\site-packages\ptterm\terminal.py", line 50, in __init__
    self.process = Process(
                   ^^^^^^^^
  File "C:\Users\jupiterbjy\AppData\Local\Programs\Python\Python312\Lib\site-packages\ptterm\process.py", line 72, in __init__
    self.terminal = create_terminal(command, before_exec_func=before_exec_func)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\jupiterbjy\AppData\Local\Programs\Python\Python312\Lib\site-packages\ptterm\process.py", line 25, in create_terminal
    from .backends.win32 import Win32Terminal
  File "C:\Users\jupiterbjy\AppData\Local\Programs\Python\Python312\Lib\site-packages\ptterm\backends\win32.py", line 6, in <module>
    from yawinpty import Pty, SpawnConfig
ModuleNotFoundError: No module named 'yawinpty'

yawinpty is missing - seems like yawinpty module itself is gone in pypi?