Closed jachym closed 6 years ago
Still, you can not run potrace
in python 3:
import potrace
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "python3.5/site-packages/potrace/__init__.py", line 1, in <module>
from potrace._potrace import *
ImportError: python3.5/site-packages/potrace/_potrace.cpython-35m-x86_64-linux-gnu.so: undefined symbol: PyString_FromString
Does python3 support potrace or not yet? are there any alternative for potrace?
@alwansm well, I switched to python 2 :-|
@jachym :| Thank you
For Python 3 users, you can replace the following method in setup.py:
def get_flags(flags, prefix):
return [flag[2:].decode() for flag in flags if flag.startswith(prefix.encode())]
You also need to change the _potrace.c file, by replacing "PyString_FromString" by "PyUnicode_FromString" :)
Hi,
when
pip install
ing pypotrace (from Git as well as from PyPI), I get following error, if Python3 is usedFor Python-2 it works