Sdl2 - RuntimeError: b'Failed creating OpenGL pixel format'įile "/Library/Frameworks/amework/Versions/3.5/lib/python3.5/site-packages/kivy/core/_init_.py", line 67, in core_select_libįile "/Library/Frameworks/amework/Versions/3.5/lib/python3.5/site-packages/kivy/core/window/window_sdl2.py", line 138, in _init_įile "/Library/Frameworks/amework/Versions/3.5/lib/python3.5/site-packages/kivy/core/window/_init_.py", line 722, in _init_įile "/Library/Frameworks/amework/Versions/3.5/lib/python3.5/site-packages/kivy/core/window/window_sdl2.py", line 237, in create_windowįile "kivy/core/window/_window_sdl2.pyx", line 140, in ._window_sdl2._tup_window (/private/var/folders/nb/bsczhst10d50_q8ddgjx45fh0000gn/T/pip-build-b1pwrh8q/kivy/kivy/core/window/_window_sdl2.c:2389)įile "kivy/core/window/_window_sdl2.pyx", line 55, in ._window_sdl2._WindowSDL2Storage.die (/private/var/folders/nb/bsczhst10d50_q8ddgjx45fh0000gn/T/pip-build-b1pwrh8q/kivy/kivy/core/window/_window_sdl2.c:1483) Unable to find any valuable Window provider at all! Providers: img_tex, img_imageio, img_dds, img_gif, img_sdl2 (img_pil, img_ffpyplayer ignored) Record log in /Users/brian/.kivy/logs/kivy_16-03-15_0.txt Older configuration version detected (0 instead of 14) Type "help", "copyright", "credits" or "license" for more information. I can run Python and "import kivy", but when I try "import ", I get the error about not being able to find a window provider. (Note that I changed the two commands from the installation instructions to "pip3")Įverything appears to work. Run "USE_OSX_FRAMEWORKS=0 pip3 install kivy".Run "brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gstreamer".Install the Xcode command line tools that the brew installation asks for.(I have another open issue using Kivy.app which is why I'm trying the pip method.) I'm trying to install Kivy for Python 3 by following the instructions here in the "using pip" section.
Now that we have it installed, in a later post I’ll discuss how to use it with server-side scripts in FileMaker.I have a brand new Mac OS X El Capitan installation. import xhtml2pdfĭef convertHtmlToPdf(sourceHtml, outputFilename):ĭest=resultFile) # file handle to recieve resultĬonvertHtmlToPdf(sourceHtml, outputFilename) Sudo pip install -target=/opt/Python/2.7/ xhtml2pdfįor El Capitan, we’ll have to tell Python about our custom path: import sys On El Capitan, its new file system restrictions complicate the install, so we must install into a specified folder: sudo mkdir -p /opt/Python/2.7/ Installation is simply sudo easy_install pip We use easy_install to bootstrap our pip based installs. Without Pip we’d have to build this separately or fiddle with some paths in obscure xhtml2pdf files.
In particular, Pip knows how to build libjpeg, a required library. Newer Python installs include Pip by default, but not Apple’s version included with OS X. This is a Python package manager that supplements easy_install.
If the command line tools are not present, you will be prompted with a dialog and options to either install the full XCode tools, or just click Install for the command line tools only. Below I’ll go through installation steps, which I’ve tested on Mac OS Yosemite and Mac OS El Capitan.Īn easy way to install this is to open the Terminal and run gcc . The install instructions are not hard, but due to a few minor complications, definitely not obvious to someone unfamiliar with Python’s package management tools.īut before we can have any fun using this, we’ll need to get it installed for us to use. But the steps below should be useful for even non-FileMaker folks who wanted to use xhtml2pdf on their system.
Of particular interest to us here at Beezwax is using it to work around the lack of PDF generation functions when running server-side FileMaker scripts. Xhtml2pdf is a cross-platform Python module that allows easy conversion of HTML or XML to PDF files. Its dependencies, ReportLab & Pisa, also have a host of very useful functions, including programmatically creating or modifying PDF content & creating barcodes.