Python version of Ruby devkit - Advice On library compilation

Chris Angelico rosuav at gmail.com
Sun Nov 8 23:21:43 EST 2015


On Mon, Nov 9, 2015 at 3:00 PM, Sayth Renshaw <flebber.crue at gmail.com> wrote:
> This is an exert
>
> DevKit Overview
> The DevKit is a toolkit that makes it easy to build and use native C/C++ extensions such as RDiscount and RedCloth for Ruby on Windows.
>
> Because on Windows with python libraries like lxml will fail with a vcvarsall error based on different c++ compilers.

Ah okay.

The normal way to install Python extensions on Windows is to get a
precompiled binary. That way, you don't have to worry about compilers
at all. In the case of lxml, you can get them straight off PyPI:

https://pypi.python.org/pypi/lxml/3.4.4

I don't have a Windows system to test with, but 'pip' should be able
to go fetch them for you. There does seem to be a bit of a hole,
though: there's an installer that targets CPython 3.2, but nothing
newer. Fortunately, there's another good place to find Windows
binaries - this unofficial (but fairly trustworthy) site:

http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml

Binaries targeting CPython 2.7, 3.3, 3.4, and 3.5 are all there.
Download the appropriate one (due to compiler differences, you MUST
pick the one for your CPython version, or it won't work), and use
easy_install on the egg file.

Actually installing a build chain on Windows is such a pain that it's
usually easier to fiddle around with binaries than to build from
source. That's probably why there's no Python DevKit - even with that
kind of thing, getting all your deps right would be a pain.

ChrisA



More information about the Python-list mailing list