drawille
drawille copied to clipboard
install / run in a Windows environment
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?
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
powershell
conemu
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.
I can confirm that this also works in the new Windows Terminal app