Forums

pygtk install possible?

Hi I want to use weasyprint, and have it installed, but this depends on some components from GTK+ (http://weasyprint.org/docs/install/). Is this somehow possible to install?

It's not something you can install yourself, unfortunately, but we'll look into getting it installed on the system image -- some work we're doing right now would make that easier. I can't promise a timeline, though, unfortunately.

ah too bad.. i'll change my pdf generating then, until this is installed. thanks

Hello,

Weasyprint is listed as being available on the "Batteries Included" page but it can't be imported. In the python interpreter 'import weasyprint' fails with 'ImportError: cannot import name properties'

If it isn't ready for primetime perhaps it should be removed from the list.

Thanks for the heads-up on that. It looks like we have a more general problem there; the batteries included page is auto-generated from the list of packages we have installed on the machine (using pip freeze), but there's a separate list of the packages that our automated testing explicitly checks. The page should be generated from the tests, I think. I'll see if we can get that fixed reasonably quickly -- we have a new version going out tomorrow, and the code is frozen for that, but perhaps we can get it done in the new year.

In the meantime, if you want to use weasyprint, I was able to get it to import without errors by running this from a bash console:

pip2.7 install --user weasyprint

So perhaps you could try that and let me know if it works for you?

Installing weasyprint as suggested above works and I'm able to import it, thanks!

On a related note, I see pisa is available but not xhtml2pdf which is its inheritor/successor. Is there a reason for this?

Thanks!

Hi Lillian,

This is because xhtml2pdf requires pillow, which conflicts with PIL (which is in our standard libraries). If you want to get xhtml2pdf, it would probably be best to setup a virtualenv and install it there to avoid any conflicts. Check out our wiki page here!

Conrad