Virtual env
Hi, while running flatland in a virtualenv on aws. I encountered a problem with the site-packages model in virtuelenv, where it does not work. to get around it i substituted in graphics_pil line 22:
try:
for s in site.getsitepackages():
os.environ['PATH'] = os.environ['PATH'] + ';' + s + '\\cairo'
os.environ['PATH'] = os.environ['PATH'] + ';' + default_os_path
if ctypes.util.find_library('cairo') is None:
print("Error: cairo not installed")
except:
import cairo
os.environ['PATH'] = os.environ['PATH'] + ';' + (cairo.__path__)[0]
if ctypes.util.find_library('cairo') is None:
print("Error: cairo not installed")
and in line 255 which is generaly shorter:
newList = os.path.abspath(os.path.join((flatland.path)[0],".."))
The downside is, you need to import flatland and cairo for it to work, and this will crash out for people who work in virtualenv but do not have cairo installed.
Edited by Christian Eichenberger