Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install / run in a Windows environment #31

Open
nnako opened this issue May 6, 2017 · 2 comments
Open

install / run in a Windows environment #31

nnako opened this issue May 6, 2017 · 2 comments
Labels

Comments

@nnako
Copy link

nnako commented May 6, 2017

I'd like to use drawille on a Windows operating system (Windows 7 or 10). After successfully installing the drawille package into my virtual environment, using pip, using it by typing

>>> from drawille import Canvas

leads to this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\nnako\ENV__Python27\lib\site-packages\drawille.py", line 23, in <module>
    import curses
  File "C:\PROGS\Python__v2_7_9\Lib\curses\__init__.py", line 15, in <module>
    from _curses import *
ImportError: No module named _curses

So, it seems, there is a dependency on the curses package and Windows doesn't provide the package, natively. So I installed curses using the instructions from this StackOverflow post. But when I now enter my python installation and enter the following lines:

>>> from drawille import Canvas
>>> c=Canvas()
>>> c.set(10,10)
>>> print(c.frame())

the result on screen is:

Ôáä

and not a dot as expected (and as I see when using my Linux computer and the same lines of code).

Any hints?

@asciimoo asciimoo added the bug label May 6, 2017
@pwab
Copy link

pwab commented Nov 3, 2017

I can confirm this problem in parts so I'll try to provide as much information as possible:

My machine

Windows 7 x64
Python v3.6.1 on win32

Python stuff

  • Installed drawille with pip install drawille
  • Get the ImportError: No module named _curses when trying to import the module
  • Installed curses‑2.2‑cp36‑cp36m‑win32.whl from pythonlibs
  • No error anymore but different output in different console-applications (and different font-settings)

Testcode

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function
from drawille import Canvas
from math import sin, radians

c = Canvas()

for x in range(0, 1800, 10):
    c.set(x / 10, 10 + sin(radians(x)) * 10)

print(c.frame())

Output

cmd.exe

cmd_2017-11-03_11-30-14

powershell

powershell_2017-11-03_11-33-02

conemu

conemu64_2017-11-03_11-34-25

Conclusion

I'm not sure how this depends on font-settings but with conemu (which has a better font- and encoding-support than the other ones) it works fine.

@sztomi
Copy link

sztomi commented Aug 12, 2019

I can confirm that this also works in the new Windows Terminal app

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants