anufrievroman / calcure

Modern TUI calendar and task manager with minimal and customizable UI.
https://anufrievroman.gitbook.io/calcure
MIT License
1.51k stars 43 forks source link

Installation on Windows #79

Open anufrievroman opened 9 months ago

anufrievroman commented 9 months ago

Lately, I am unable to run it on Windows. It's installed but when I run python -m calcure it just does not start TUI interface and quits the process after a second without any errors. I was wondering if anyone recently was able to install it on Windows? Perhaps windows-curses library has changed or some other windows specific component?

jose1711 commented 9 months ago

Have only tested with latest version from pypi (2.9.6). Running pip install calcure followed by python -m calcure returned error: No module named: '_curses'.

Had to run pip install windows-curses, then it worked.

OS: Windows 11 Pro, python 3.11.6 from MS Store

anufrievroman commented 9 months ago

Good to hear that, maybe it's just my problem. Previously it worked for me just like described in readme (like you described) but lately didn't work.

By the way, do you know if we can add windows-curses as a dependency to setup.py depending on the OS?

jose1711 commented 9 months ago

By the way, do you know if we can add windows-curses as a dependency to setup.py depending on the OS?

Sorry, I don't have much experience with packaging Python apps.

anufrievroman commented 9 months ago

Okay, since it seems to work for other people I'll close this.

Bobrokus commented 7 months ago

The same thing happens to me. When I run python -m calcure via my shell, it does nothing for a second and quits.

I was able to find some error code, though.

After running python -m calcure via Win + R error pops up.

image It's running in Windows Terminal now because Win+R opened the default terminal, which is Windows Terminal

However, it might not be an error from the code itself.

csc530 commented 7 months ago

I have the same problem. I found that with the scoop main/python (3.12.1) package, calcure wouldn't work but with the main/winpython (3.11.6.0) package, it does work as expected. I think it may have to do with some of the bundled packages with winpyhton.

I don't have much experience with Python to investigate if there's a missing dependency for the project for Windows, but I tried installing exclusively each package that comes with WinPython, but it still would close after a few seconds. So I don't think it's any individual package in winpython

Bobrokus commented 7 months ago

This Stack Overflow answer might help

anufrievroman commented 7 months ago

Thank you everyone for reporting. I have a feeling that it's something about environments. Like someone on stack overflow points out, installation with pip might not work but installation with conda does. I mean, the package used to work in Windows and people did successfully installed the last version, so it's something about individual Python configuration.

At the moment, I don't have any windows installations at hand to check it. Could someone try installing it with conda or something like that?

Bobrokus commented 7 months ago

@anufrievroman What exactly is Conda? I haven't used it before.

anufrievroman commented 7 months ago

Me neither but it's like a python distribution, it comes from Anaconda, and there python is sort of isolated from the system.

csc530 commented 7 months ago

I tried installing calcure with Conda/Anaconda's (scoop extras/anaconda3) pip install, not conda install and it too worked. Even though I'm fairly certain global pip installs isn't what it was designed for.

Conda also comes pre-packed with a variety of packages too

Bobrokus commented 7 months ago

I tried to install calcure with pipx. It returned this: error

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "D:\ctibo\.local\bin\calcure.exe\__main__.py", line 4, in <module>
  File "C:\Users\ctibo\AppData\Local\pipx\pipx\venvs\calcure\Lib\site-packages\calcure\__main__.py", line 5, in <module>
    import curses
  File "D:\Program Files\Scoop\apps\python\3.12.1\Lib\curses\__init__.py", line 13, in <module>
    from _curses import *
ModuleNotFoundError: No module named '_curses'

I tried installing windows-curses via pip install windows-curses as @jose1711 suggested but with no luck.

anufrievroman commented 7 months ago

@Bobrokus yes this error means that you need windows-curses library. So, when you install it, the error persists?

Bobrokus commented 7 months ago

@anufrievroman yes

JH34tem commented 4 months ago

Doesn't run on windows, there's no error message in cmd prompt but yea