asciinema / discussions

Public open-ended discussions about asciinema
https://github.com/orgs/asciinema/discussions
1 stars 2 forks source link

Please clarify whether asciinema is expected to work on Windows #46

Closed rayluo closed 1 year ago

rayluo commented 2 years ago

Previously someone reported that even the "pip install ..." would fail, but my pip install asciinema attempt on Windows can successfully install asciinema 2.1. It even installs an "asciinema .exe " to my path. Is that a sign for native Windows support?

But then, your subsequent run(s) of "asciinema" would still yield that "fcntl" error:

(env39) C:\Users\rayluo>asciinema
Traceback (most recent call last):
  File "C:\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\rayluo\env39\Scripts\asciinema.exe\__main__.py", line 4, in <module>
  File "C:\Users\rayluo\env39\lib\site-packages\asciinema\__init__.py", line 9, in <module>
    import asciinema.recorder
  File "C:\Users\rayluo\env39\lib\site-packages\asciinema\recorder.py", line 5, in <module>
    import asciinema.pty as pty
  File "C:\Users\rayluo\env39\lib\site-packages\asciinema\pty.py", line 3, in <module>
    import fcntl
ModuleNotFoundError: No module named 'fcntl'

I found some old conversation suggesting no Windows support. But again, is "pip install asciinema" on Windows and that "asciinema.exe" meant to work on Windows? @sickill

normen commented 2 years ago

Afaict this "works" because its based on python and python just does its thing of creating an executable for the current platform. However asciinema requires some functions and libraries that are not available on windows. The windows "terminal" is not a terminal in the Unix sense but that is what asciinema was written for.

In short - this probably won't work and the .exe is no hint that windows support is intended. I am just a user though so I can't say this with 100% certainty.

rollingmoai commented 2 years ago

You can try this port for Windows: https://github.com/Watfaq/PowerSession-rs

mateialexandru commented 1 year ago

You can try this port for Windows: https://github.com/Watfaq/PowerSession-rs

Cannot recommend enough this comment! This is a great workaround for Windows!

Cornelius-Figgle commented 1 year ago

Yes PowerSession-rs seems to work the same (I have do brief tests but not played around fully yet)

mateialexandru commented 1 year ago

Yes PowerSession-rs seems to work the same (I have do brief tests but not played around fully yet)

same here - basic testing and so far so good