Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4000626
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:48:17+00:00 2026-05-20T07:48:17+00:00

I am trying to build lxml for Python 2.7 on Windows 64 bit machine.

  • 0

I am trying to build lxml for Python 2.7 on Windows 64 bit machine. I couldn’t find lxml egg for Python 2.7 version. So I am compiling it from sources. I am following instructions on this site

http://lxml.de/build.html

under static linking section. I am getting error

C:\Documents and Settings\Administrator\Desktop\lxmlpackage\lxml-2.2.6\lxml-2.2.
6>python setup.py bdist_wininst --static
Building lxml version 2.2.6.
NOTE: Trying to build without Cython, pre-generated 'src/lxml/lxml.etree.c' need
s to be available.
ERROR: 'xslt-config' is not recognized as an internal or external command,
operable program or batch file.

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
Building against libxml2/libxslt in one of the following directories:
  ..\libxml2-2.7.6--win32--w2k--x64\lib
  ..\libxslt-1.1.26--win32--w2k--x64--0002\lib
  ..\zlib-1.2.4--win32--w2k--x64
  ..\iconv-1.9.1--win32--w2k--x64-0001\lib
running bdist_wininst
running build
running build_py
running build_ext
building 'lxml.etree' extension
error: Unable to find vcvarsall.bat

Can any one help me with this? I tried setting the path to have Microsoft Visual Studio..
I can run vcvarsall.bat from the commandline.. but python is having problems

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:48:18+00:00Added an answer on May 20, 2026 at 7:48 am

    I bet you’re not using VS 2008 for this 🙂

    There’s def find_vcvarsall(version): function (guess what, it looks for vcvarsall.bat) in distutils with the following comment

    At first it tries to find the
    productdir of VS 2008 in the registry.
    If that fails it falls back to the
    VS90COMNTOOLS env var.

    If you’re not using VS 2008 then you have neither the registry key nor suitable environment variable and that’s why distutils can’t find vcvarsall.bat file. It does not check if the bat file is reachable through the PATH environment variable.

    The solution is to define VS90COMNTOOLS variable to point to Tools directory of Visual Studio.

    That being said take a look at 11.4. distutils.msvccompiler — Microsoft Compiler section in Python’s docs which states

    Typically, extension modules need to
    be compiled with the same compiler
    that was used to compile Python.

    Martin v. Loewis in the email titled Download Visual Studio Express 2008 now on python-list mailing list states the same

    Python 2.6, 2.7, and 3.1 are all built
    with that release (i.e. 2008). Because
    of another long tradition, Python
    extension modules must be built with
    the same compiler version (more
    specifically, CRT version) as Python
    itself. So to build extension modules
    for any of these releases, you need to
    have a copy of VS 2008 or VS 2008
    Express.

    In the light of above statements you should use VS 2008 if you want to build lxml for Python 2.7 so although setting VS90COMNTOOLS takes care of finding vcvarsall.bat file it’s not the solution.

    That being said 🙂 people do try to use older CRT with newer compiler:
    Can I use Visual Studio 2010’s C++ compiler with Visual Studio 2008’s C++ Runtime Library?
    How to Enforce C++ compiler to use specific CRT version?
    VS 2008 – Link against older C runtime

    I’d like to thank Kev Dwyer (for pointing out importance of version of VS which is used) and Stefan Behnel (for pointing me to distutils as a place dealing with compiler’s configuration) in the thread Problem building lxml under Windows – error: Unable to find vcvarsall.bat on lxml mailing list. I’d like to also thank agronholm from freenode #distutils IRC channel for confirmation that distutils does contain code which looks for vcvarsall.bat file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build a grammar with the following: NUMERIC: INTEGER | FLOAT |
Im trying to build a calculator with PyQt4 and connecting the 'clicked()' signals from
Am trying to build boost on x64 windows. So far all is going well,
Trying to build a GUI application in Java/Swing. I'm mainly used to painting GUIs
I trying to build and compile my xcodeproj in command line and it is
I'm currently trying to build a personal website to create a presence on the
I am trying to build a function in C/C++ to sort an array and
I am trying to build an website for my college's magazine. I used the
I am trying to build out a useful 3d game engine out of the
I am trying to build a dependency graph of tables based on the foreign

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.